Passing all pandas DataFrame columns to function as separate parameters

zljubisic at gmail.com zljubisic at gmail.com
Fri Apr 27 09:50:41 EDT 2018


Hi,
I have pandas DataFrame with several columns. I have to pass all columns as separate parameter to a function. 
Something like this if I have 4 columns.
f, p = stats.f_oneway(df_piv.iloc[:, 0], df_piv.iloc[:, 1], df_piv.iloc[:, 2], df_piv.iloc[:, 3])
As number of columns varies, how to do it in the most efficient way?
Regards.


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /