import pandas as pd # 读取Excel文件 excel_file = 'your_excel_file.xlsx' df = pd.read_excel(excel_file) # 将数据框保存为CSV文件 csv_file = 'your_csv_file.csv' df.to_csv(csv_file, index=False, encoding='utf-8')