python日记——Pandas之Excel处理 创建文件 import pandas as pd df = pd.DataFrame({'ID':[1,2,3],'Name':['Tom','BOb','Gigi']}) df.to_excel("C:/Temp/Output.xlsx") print("done!") 读取文件 import pandas as pd people = pd.read_excel("C:/Temp/people.xlsx",index_col='ID') #index_col用于设置索引 print(people.shape) print(people.co