1. 首页
  2. 数据库
  3. 其它
  4. python日记Day17——Pandas之Excel处理

python日记Day17——Pandas之Excel处理

上传者: 2020-12-23 01:44:12上传 PDF文件 54.45KB 热度 15次
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
下载地址
用户评论