# 把csv转xlsimport pandas as pddf = pd.read_csv('data.csv', encoding='GB18030')df.to_excel('data.xls', index=False)