I am working with multiple data frames(over 20) and I like to make a loop which add two new columns of mean value of both columns in every data frames. I like to use loop because amount of data frames can alter.
Example of data:
df_1:
Width Thickness
1 1000 1
2 1500 2
df_2:
1 1200 3
2 1200 4
3 1000 2
df_3:
1 1200 3
2 1500 4
desired outcome:
df_1:
Width Thickness mean_width mean_thick
1 1000 1 1250 1.5
2 1500 2 1250 1.5