我试图附加这张纸,但最后只显示第一张纸xls = pd.ExcelFile('MyFile.xlsx')for sheetname in xls.sheet_names: sheetname = pd.read_excel('MyFile.xlsx', sheet_name = sheetname, header=[8,9]) sheetname.drop(sheetname.tail(3).index,inplace=True) out_df = sheetname.append(sheetname)
1 回答
12345678_0001
TA贡献1802条经验 获得超5个赞
见下文:
xls = pd.ExcelFile('MyFile.xlsx')
for sheetname in xls.sheet_names:
sheetname = pd.read_excel('MyFile.xlsx', sheet_name = sheetname, header=[8,9])
sheetname.drop(sheetname.tail(3).index,inplace=True)
out_df = out_df.append(sheetname)
# -------^^^^^^
已标记更正
添加回答
举报
0/150
提交
取消