TypeError: 'DataFrame' objects are mutable, thus they cannot be hashed
在使用pandas的get_dummies()函数的时候,出现错误:
下面是我的dataframe:
下面是我想把data里面的rank进行one-hot编码,利用pad.get_dummies函数:
意思就是dataframe是可变的,我改了一下代码就好了,其实也不知道为什么,所以看见的同学如果知道请告诉我为什么。
在使用pandas的get_dummies()函数的时候,出现错误:
下面是我的dataframe:
下面是我想把data里面的rank进行one-hot编码,利用pad.get_dummies函数:
意思就是dataframe是可变的,我改了一下代码就好了,其实也不知道为什么,所以看见的同学如果知道请告诉我为什么。