Python 属性错误:';numpy.ndarray和#x27;对象没有属性';补丁';

Python 属性错误:';numpy.ndarray和#x27;对象没有属性';补丁';,python,pandas,numpy,csv,attributeerror,Python,Pandas,Numpy,Csv,Attributeerror,我的数据集: weather = pd.read_csv('https://coded2.herokuapp.com/datavizpandas/london2018.csv') weather.head(3) 我无法将标签点添加到labelsubplot=True,layout=(2,2) AttributeError:'numpy.ndarray'对象没有属性'patches' 有人能帮我解决这个问题吗 { ax=weather.plot(kind='bar',y=['Tmax','Tm

我的数据集:

weather = pd.read_csv('https://coded2.herokuapp.com/datavizpandas/london2018.csv')

weather.head(3)
我无法将标签点添加到label
subplot=True,layout=(2,2)
AttributeError:'numpy.ndarray'对象没有属性'patches'

有人能帮我解决这个问题吗

{ ax=weather.plot(kind='bar',y=['Tmax','Tmin','Rain','Sun'], 
x='Month',subplots=True)
for i in ax.patches:
ax.text(i.get_x(),i.get_height()+0.21,str(round(i.get_height())),
fontsize=10)
plt.xticks([0,1,2,3,4,5,6,7,8,9,10,11],
['jan','feb','mar','apr','may','jun','july','aug','sep','oct','nov','dec']
plt.show()}

你已经为你的ax添加了补丁了吗?我不知道如何为我的ax添加补丁。这段代码运行良好。ax=weather.plot(kind='bar',y=['Tmax','Tmin'],x='Month',figsize=(16.5,8.5)),在将子批添加到ax之后,它工作不正常。谢谢你,你已经为你的ax添加了补丁了吗?我不知道如何为我的ax添加补丁。这段代码运行良好。ax=weather.plot(kind='bar',y=['Tmax','Tmin'],x='Month',figsize=(16.5,8.5)),在将子批添加到ax之后,它工作不正常。非常感谢。