#Excel turn CSV, One sheet Save the table in a CSV In the file , And sheet Naming
import pandas as pd
def xlsx_to_csv_pd():
#sheet_name=None Read all sheet, perhaps sheet_name=[0,10], This is used here sheet_name, Instead of using sheetname
data_xls =
pd.read_excel(‘C:\Users\Administrator\Desktop\test\1.xlsx’,sheet_name=None,index_col=0)
for key in data_xls:
data_xls[key].to_csv(‘C:\Users\Administrator\Desktop\test\’+key+’.csv’,
encoding=‘utf-8’)
if name == ‘main’:
xlsx_to_csv_pd()

#csv turn Excel
import pandas as pd
def csv_to_xlsx_pd():
csv = pd.read_csv(‘C:\Users\Administrator\Desktop\test\1.csv’,
encoding=‘utf-8’)
csv.to_excel(‘C:\Users\Administrator\Desktop\test\2.xlsx’, sheet_name=‘data’)
if name == ‘main’:
csv_to_xlsx_pd()

Technology
©2020 ioDraw All rights reserved
Java realization PDF Online preview ( Four methods ) Android Development — Display food information according to customer budget spark.sql.shuffle.partitions and spark.default.parallelism The difference between Big data environment --- data warehouse (hive+mysql+hadoop) The construction of Children programming children's learning route What do you do in Shanghai to make money fast ? this 10 You can have a try ! Advanced programmer - Deep understanding of data structure After the outbreak Which programming has a bright future 2020 Nobel Prize in physiology or medicine announced Trump's "VIP therapy ": Is receiving a drug treatment that has not yet been approved