pandas不能在pycharm中使用plot()方法顯示圖像的解決方法

最近用了pycharm,感受還不錯,就是pandas中Series、DataFrame的plot()方法不顯示圖片就給我結束了,可是我在ipython裏就能畫圖python

之前的代碼是這樣的code

import matplotlib.pyplot as plt
from pandas import DataFrame,Series
 
Series([4,5,7]).plot()

找了半天 發現只要加個圖片

plt.show()

就能夠顯示圖像了了ip

import matplotlib.pyplot as plt
from pandas import DataFrame,Series

Series([4,5,7]).plot()
plt.show()

哦了pycharm

相關文章
相關標籤/搜索