I have quite a few dataframes which I defined early in my script and I would like to iterate over them and modify them like so:
for df in [df_fap, df_spf, df_skin, ...]:
df = df.filter(regex=(assay + r"[0-9]+"))
However this does not work. The values of the dataframes are not modified when the loop finishes. I stumbled upon this post which is slightly similar (except I define my variables beforehand) but it doesn't really offer a solution to my exact problem. Thanks!