generate functionThu, 27 Jul 2023

como renombrar una hoja de mi libro de Excel

#import pandas import pandas as pd #Load data from file data = pd.read_excel('sample-salesv3.xlsx') #Get sheet names print(data.sheet_names) #Get specific sheet df = data.parse('Sheet1') #Set up new column names df.columns = ['account number', 'name', 'sku', 'quantity', 'unit price', 'ext price', 'date'] #save dataframe to csv df.to_csv('my_csv.csv')

Questions about programming?Chat with your personal AI assistant