I wrote a script with one dataframe df1 and applied to it a lot of operations. For example:
df1 = df1.rename(columns={'Unnamed: 0': ''})
df1.iloc[:,0] = re.search('\d{2}', df1.columns[3]).group(0)
But now I have a list of dataframes dfs. Is it possible, and so how can I apply all operations to a list of dataframes?
I tried
for df in dfs:
df = df.rename(columns={'Unnamed: 0': ''})
df.iloc[:,0] = re.search('\d{2}', df.columns[3]).group(0)
But it is overwriting and I get only the last dataframe from the list.