场 景:
两个csv文件,保存了一些数据,第一列为时间,想要得到其他列的量随着时间的变化曲线。
import json
import pandas as pd
import os
import matplotlib.pyplot as plt
"""
https://blog.csdn.net/weixin_45683963/article/details/106967614
https://www.jianshu.com/p/c41ac57cea33
"""
if __name__ == '__main__':
OneFile = " data1.csv"
otherFile = " data2.csv"
# print(1234567);
OneFileData = pd.read_csv(OneFile)
otherFileData = pd.read_csv(otherFile)
OneFileData.info() # 输出读入的csv数据的基本信息
otherFileData.info()
listKeys = [] # 将需要绘制的列的名字放到list里面
listKeys.append('price')
listKeys.append('quantity')
xLabelVar = &#