【发布时间】:2017-06-25 03:34:20
【问题描述】:
我正在尝试从数据框中绘制条形图。这是数据框
当我尝试编写代码来显示条形图时,它会返回此错误。
TypeError: unsupported operand type(s) for /: 'str' and 'int'
我用谷歌搜索了它,很多人添加了这个关键字kind="count",但一点作用都没有。这是我正在使用的代码。
#Using seaborn to get the hours against the user_count
sns.set_style("whitegrid")
ax = sns.barplot(x= 'hours', y= 'user_count', data=dff)
ax.set(ylabel = 'User Count')
ax.set(xlabel = 'Hour of the Day')
ax.set_title('2017-06-02/ Friday')
plt.show()
【问题讨论】: