I have some DataFrames:
d = {'colA': [1, 2], 'colB': [3, 4]}
df = pd.DataFrame(data=d)
df2 = pd.DataFrame(data=d)
df3 = pd.DataFrame(data=d)
I want to return a list of columns containing the string 'A', e.g. for one DataFrame:
[column for column in df.columns if 'A' in column]
How can I do this for multiple DataFrames (e.g., df, df2, df3)?
The desired output in this example would be ['colA', 'colA', 'colA']