美文网首页我爱编程
pandas plot() 方法无法在VSCODE中显示图画

pandas plot() 方法无法在VSCODE中显示图画

作者: 夜霸槽 | 来源:发表于2017-06-02 11:40 被阅读0次

import matplotlib.pyplot as plt #引入matplotlib
from pandas import DataFrame, Series

clean_tz = frame['tz'].fillna('MISSING')
clean_tz[clean_tz == ''] = 'UnKnown'
tz_counts = clean_tz.value_counts()
print tz_counts[:10]
tz_counts[:10].plot(kind='barh',rot=0)
plt.show()#用show()方法

相关文章

网友评论

    本文标题:pandas plot() 方法无法在VSCODE中显示图画

    本文链接:https://www.haomeiwen.com/subject/wwtufxtx.html