I am doing some experiments and for each one I get an excel file. Every time I do a experiment I get between 20 and 30 excel files. This is why I try to don't import file by file using pd.read_excel
I'm trying to do a script to import each file into a DataFrame with the original name.
import os
import pandas as pd
path = r'C:\Luis\Desktop\Experiments\Day1\\'
files = os.listdir(path)
file = [x[:-5] for x in files] %delete extension
for f in file:
f = pd.read_excel(path+f+'.xlsx', 'Analysis with Voltage')
I expect a DataFrame for each excel file
I got a DataFrame named f with the last excel file. I can see that the problem is that the variable don't iterate. Any suggestion about how to continue?