读取和博客可视化分析
和讯网可视化分析
import pandas as pda
import numpy as npy
import matplotlib.pylab as pyl
data=pda.read_csv("D:/数据/hexun.csv")
data.values#[][]第几行,第几列
data2=data.T
pyl.subplot(2,1,1)
y1=data2.values[3]
x1=data2.values[4]
pyl.title("www.hexun.com")
pyl.xlabel("number of comments")
pyl.ylabel("number of browse")
pyl.plot(x1,y1)
pyl.subplot(2,2,3)
x2=data2.values[0]
pyl.xlabel("article id")
pyl.ylabel("number of browse")
pyl.plot(x2,y1)
pyl.subplot(2,2,4)
y3=data2.values[4]
pyl.xlabel("article id")
pyl.ylabel("number of comments")
pyl.plot(x2,y3)
pyl.show()