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()方法
网友评论