表格去重代码
import pandas as pd
EXCEL_FILE_PATH = input("input the file:")
df = pd.read_excel(EXCEL_FILE_PATH,sheet_name = 'Sheet1')
df = df.drop_duplicates(subset = ['修改内容'])
df.to_excel(excel_writer = 'new1.xlsx')
执行上述代码,结果表格格式发生改变,请问通过什么方法可以实现去重后不改变表格格式