Skip to content

Loop through a few commands using a function

I have a loop where I constantly got an error message. I want to loop them through a function. So far I have: How can I number the df and let the df go through 1, 2, 3, 4 (like df1, df2 df3) Answer col is a variable. ‘col’ is a string. Having df[‘col’] doesn’t refer to the variab…