I created a function with 3 parameters input: x y z. I want to loop over them. x is a dataframe with one column y same z asks for a dataframe with multiple columns
I tried this:
result = [f(x,y,z) for x,y,z in zip(df1["1com"], df2["1com"], df3["3com"])]
Df 1,2,3 have the same index length.
This doensnt work because the method list comp doesn't allow for multiple columns like this. I tried a bunch of things with out succes.
btw I found the list comprehension method here: How to iterate over rows in a DataFrame in Pandas