I would like to loop over two dataframes df1 and df2. These frames have the same columns and I would like to remove rows containing 12 as a value in col2.
The code that works for a single datafareme is the below:
df1 = df1[df1['col2'] != 12]
I have tried to create a list and loop over this list but is seem incorrect:
y = [df1, df2]
for x in y:
x = x[x['col2'] != 12]