I am new to Seaborn, and I am trying to plot a barplot
that shows the average (mean) of an attribute on the Y axis, but I am unsure what is going wrong with my code.
This is my code:
fig, ax = plt.subplots(figsize=(15,10))
sns.barplot(data=df, x='Day', y=df['Spending'].mean())
ax.set(xlabel="Day of the Week", ylabel = "Average Spending each Day")
When I try to execute my code, I just get this error:
AttributeError: 'bool' object has no attribute 'all'
Any help on how to get the average to show on my Y axis would be greatly appreciated, including what I am doing wrong.
Thank you!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…