for j in df[df['KeyCol']==i].index]print(type(d)) 但是程序给出了错误,并说 line 1492, in __hash__TypeError: 'Series' objects are mutable, thus they cannot be hashed 我该怎么办?
df_fe.artist.value_counts().to_dict()df_fe["artist_popularity"] = artist_pop_dic[df_fe["artist"]]TypeError: 'Series' objects are mutable, thus they cannot be hashed
有人能帮帮忙吗。
在以下代码中:import numpy as npdf = pd.DataFrame({'Group': pd.Series(random.choice(['A', 'B']) for _ in range(sz)),
'Key': pd.Series(np.random.randint(2, highdf.groupby('Group').a