csv2excel.py 196 B

12345678910
  1. import pandas as pd
  2. def csv_to_xlsx():
  3. csv = pd.read_csv(r"result.csv", encoding="gb2312")
  4. csv.to_excel(r"result.xlsx", sheet_name="data")
  5. if __name__ == "__main__":
  6. csv_to_xlsx()