my dataframe looks like this:
PD_DK WARNSPEAK_DK
1 88 88
2 Nan 1
3 88 1
4 1 1
here is my code(it's basically replacing 88 vavlue to 999999):
df2.replace({['PD_DK','WARNSPEAK_DK','TIME1','TIME2','TIME3','TIME4','WARNBEHAV_DK','TIME5','TIME6','TIME7',
'TIME8','WARNEMOTION_DK','TIME9','TIME10','TIME11','TIME12']: 88}, 999999, inplace=True)
# to check
df2['PD_DK'].value_counts()
and I got the output such as:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Input In [31], in <cell line: 1>()
----> 1 df2.replace({['PD_DK','WARNSPEAK_DK','TIME1','TIME2','TIME3','TIME4','WARNBEHAV_DK','TIME5','TIME6','TIME7',
2 'TIME8','WARNEMOTION_DK','TIME9','TIME10','TIME11','TIME12']: 88}, 999999, inplace=True)
3 df2['PD_DK'].value_counts()
TypeError: unhashable type: 'list'