关注微信公共号:小程在线

关注CSDN博客:程志伟的博客:

 

weather_2012['Temp (C)'].resample('M', how=np.median).plot(kind='bar')
Traceback (most recent call last):

  File "<ipython-input-26-59c50ec9a1b7>", line 1, in <module>
    weather_2012['Temp (C)'].resample('M', how=np.median).plot(kind='bar')

TypeError: resample() got an unexpected keyword argument 'how'

Python TypeError: resample() got an unexpected keyword argument ‘how‘

 

解决方法:

在resample()函数中how已经不再使用了,改成  .median()

weather_2012['Temp (C)'].resample('M').median().plot(kind='bar')

Python TypeError: resample() got an unexpected keyword argument ‘how‘

Python TypeError: resample() got an unexpected keyword argument ‘how‘

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-19
  • 2022-03-07
  • 2021-12-02
  • 2021-06-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案