I am using the below code to iterate through many data frames based on a few keywords. There are 20 data frames and about 30 columns. I am not able to append each data frame to create a list of data frames. Any suggestions would be helpful.
out=[]
for df in dfs:
out.append(df.filter(regex=r"key|words|find(?=[^\d]|$)"))
This may work. Please let me know if there is a better way to make it work.