I have a folder called detail_data , where in there are multiple folders with "number" as a name. Example: 1 , 4,8 etc , each of these folders contain one excel file called Measurement table. I used the following code but it returns an empty list.
path = pathname
df_list = []
for i in os.listdir(path):
if i.isdigit():
pathfile = path+'/'+i+"/Measurement table.csv"
df= pd.read_csv(pathfile)
df_list.append(df)
Why is it returning an empty list? Is there any other way to loop into all these folders , there are about 40 folders like these.