标签:map replace file 保存 iter sheet span code logs
time31 = pd.read_excel(‘F:/save_file/3问出车表.xlsx‘, sheetname=‘Sheet1‘) # 读取‘3问出车表.xlsx’中的Sheet1表单, time32 = pd.read_excel(‘F:/save_file/3问出车表.xlsx‘, sheetname=‘Adjustment‘) # 读取‘3问出车表.xlsx‘中的Adjustment表单 time31 = time31.replace(‘NaN‘,0) time32 = time32.replace(‘NaN‘,0) time_31 = time31.applymap(trans) time_32 = time32.applymap(trans)
# 保存为‘3问time出车表.xlsx‘文件 with pd.ExcelWriter(‘F:/save_file/3问time出车表.xlsx‘) as writer: time_31.to_excel(writer,sheet_name = ‘Sheet_1‘) time_32.to_excel(writer,sheet_name = ‘Sheet_2‘)
writer.save()
标签:map replace file 保存 iter sheet span code logs
原文地址:http://www.cnblogs.com/cymwill/p/6790676.html