ValueError: Grouper for <something> not 1-dimensional
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm have the following code which creates a table and a barplot via seaborn. #Building a dataframe grouped by the # of Engagement Types sales_type = sales.groupby('# of Engagement Types').sum() #Calculating the % of people who bought the course by # engagement types sales_type['% Sales per Participants'] = round(100*(sales_type['Sales'] / sales_type['Had an Engagement']), 2) #Calculating the # of people who didn't have any engagements sales_type.set_value(index=0, col='Had an Engagement', value=sales[sales['Had an Engagement']==0].count()[