import pandas as pd
import xlrd
data = pd.read_excel(r"C:\Users\Administrator\Desktop\示例\汇总表.xlsx", encoding='gbk')
area_list = list(set(data['部门']))
writer = pd.ExcelWriter(r"C:\Users\Administrator\Desktop\示例\拆好的表.xlsx", engine='xlsxwriter')
for j in area_list:
df = data[data['部门'] == j]
df.to_excel(writer, sheet_name=j, index=False)
writer.save()
上面这段python代码是用来拆分excel的,但是有一个问题,拆分的结果会以科学计数法显示,怎样可以设置成文本格式?