美文网首页
Python使用pandas库绘图

Python使用pandas库绘图

作者: linghugoogle | 来源:发表于2018-07-19 10:58 被阅读13次
#代码
#matplotlib库仅用于show()
import pandas as pd
import matplotlib.pyplot as plt
file='d_train_20180102.csv'
data=pd.read_csv(file,encoding='gbk')
tr_y = data.loc[:,'血糖']
print(type(tr_y))
#直方图
tr_y.hist(bins=500)
plt.show()
#直方图,xy轴相反
tr_y.plot()
plt.show()

相关文章

网友评论

      本文标题:Python使用pandas库绘图

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