项目3-Excel文件数据横竖DataFrame处理
基础代码:
import numpy as np import pandas as pd import matplotlib.pyplot as plt stuDict={ "zs":[90,87,98,67,98,56], "wang":[56,90,45,33,90,78], "guo":[56,90,45,33,90,78], "li":[56,90,45,33,90,78], } df=pd.DataFrame(stuDict,index=['Term 1','Term 2','Term 3','Term 4','Term 5','Term 6']) print(df) df.plot(kind='bar') df.plot() plt.show()