I want to import a column worth of data from multiple sheets in a single excel file and create a single large dataframe with all of the columns. Additionally, I want the name of the new column to be a string that it also being taken from the excel file.
I've tried a few different things, each with a different issue, but here is a start that works:
import pandas as pd
file = r'C:\Users\pazam\OneDrive\Desktop\neuromastCount\sf\Final_Raw.xlsx' #SF
path = r'C:\Users\pazam\OneDrive\Desktop\neuromastCount\sf'
results_raw = pd.DataFrame()
for i in range(19): #19 sheets
df = pd.read_excel(file, usecols='N',skiprows = range(0,37),nrows=36000,engine='openpyxl',header=None, sheet_name=i)
trt = pd.read_excel(file, usecols='G',nrows=1,engine='openpyxl',header=None, sheet_name=i)
# then something that adds df to results_raw as a new column with the string in trt as column header
raw_csv = path+"/results_raw.csv"
results_raw.to_csv(raw_csv)
thanks!


