查看: 44  |  回复: 0
  Python 将excel单表转csv 极其简单
楼主
发表于 2024年10月13日 22:27
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')


您需要登录后才可以回帖 登录 | 立即注册
【本版规则】请勿发表违反国家法律的内容,否则会被冻结账号和删贴。
用户名: 立即注册
密码:
2020-2024 MaNongKu.com