标签: python pivot
df = df.drop_duplicates(['beer_beerid','review_profilename']) df_movie_features = train.pivot( index='beer_beerid', columns='review_profilename', values='review_overall' ).fillna(0)
这会导致值错误:
ValueError:索引包含重复的条目,无法重塑