#导包
import matplotlib.pyplot as plt
import pandas as pd
import time
data=pd.read_csv('filename')#导入csv文件
y=data['number'].T.values#设置y轴数值 ,.T是转置
x=[]
array=[0,len(y)]
for i in array:
x[i]=time.mktime(time.strptime(data['tm'][i],"%Y-%m-%d %H:%M:%S"))#将string类型的时间字符串转换为float类型
plt.figure(figsize=(10,6))
plt.plot(x,y,'')
plt.xlabel('date')
plt.ylabel('number')
plt.show()