from pandas import Series, DataFrame
import numpy as np
ss = Series(np.random.randn(10).cumsum(), index = np.arange(0,100,10)) ss.plot() <matplotlib.axes._subplots.AxesSubplot object at 0x0384B770> 没有显示图片 ss.show() Traceback (most recent call last): File "<pyshell#35>", line 1, in <module> ss.show() File "C:\Program Files\Python36-32\lib\site-packages\pandas\core\generic.py", line 3614, in __getattr__ return object.__getattribute__(self, name) AttributeError: 'Series' object has no attribute 'show' >>> ss.plot().show() Traceback (most recent call last): File "<pyshell#36>", line 1, in <module> ss.plot().show() AttributeError: 'AxesSubplot' object has no attribute 'show' 解决办法: import pylab pylab.show()