【发布时间】:2019-10-08 04:29:57
【问题描述】:
我必须从我的 excel 文件中读取和绘制数据的代码是这样的:
import pandas as pd
import matplotlib.pyplot as plt
excel_file = 'file1.xlsx'
file1 = pd.read_excel(excel_file)
file1.head()
plt.plot(x,y1,y2)
plt.xlabel('wavelenghts')
plt.ylabel('reflectivity')
plt.legend(loc='upper left')
plt.show
有效。
问题是:
我有更多列,但是当我想添加
y3, y4,...时,我收到y3 is undefined.的错误在传说中,我想将
y1的名称更改为CK4/5-PCA82500以及其他名称。有什么办法吗?
【问题讨论】:
标签: excel pandas matplotlib