Article Directory
Preface
I don’t understand the usual class, but I still want to learn this course. The result is inexplicably ending. The teacher asked us to write a paper and find data for time series analysis.
I did it with R and found that the picture is a bit ugly, so I want to do it again with Python.
There are a lot of tutorials on the Internet. I won’t say how to write them. Anyway, I can’t get in touch with people. If I can get in touch, it’s not so important to reproduce it. One day, if you are in a hurry, you can contact me directly in the QQ group: 1160678526
Texture
Now this picture is a bit sloppy, but this is my best effort before the date of the thesis defense, and I will update it in the future.
If you find something better than my picture, I would like to let you know! ! !
Implementation code
import pandas as pd
import matplotlib.pyplot as plt
list_a = range(1,2) #下面那行需要参数为列表,这里取第二列
data = pd.read_csv('fw2.csv',usecols=list_a) #从csv文件中读取第二列数据
plt.rcParams['font.sans-serif']=['SimHei'] #用来正常显示中文标签
plt.title("'CSDN看,未来‘ 10月访问量") #标题
#横纵坐标
plt.xlabel('Time')
plt.ylabel('PV')
#数据、标记为o、颜色red
plt.plot(data,marker='o',color='r')
#data.plot(style='r-',marker='o')
plt.show()