我正在尝试创建一个boxplot,但是我遇到了这个错误- 'Series‘对象没有'boxplot’属性
下面是我当前的代码:
fig = plt.figure(figsize=(8,6))
ax = fig.gca()
frame['ArrDelay'].boxplot(ax = ax)
ax.set_title('BoxPlot of ArrDelay')
ax.set_xlabel('ArrDelay')
ax.set_ylabel('Delay Time')有什么建议吗?
发布于 2018-07-18 04:40:16
假设您使用的是pandas DataFrame
fig = plt.figure(figsize=(8,6))
ax = fig.gca()
frame.boxplot(column='ArrDelay', ax=ax)
# frame['ArrDelay'].plot.box(ax=ax) # Alternative
ax.set_title('BoxPlot of ArrDelay')
ax.set_xlabel('ArrDelay')
ax.set_ylabel('Delay Time')https://stackoverflow.com/questions/51389793
复制相似问题