1

I am looping over a pandas DataFrame and trying to perform ANOVA. I have the arguments to the function stored in a list, but don't know how to enter all of the list arguments into the function as separate arguments. As I am looping through many columns, the length of the list is different every time. Is there any way to do this?

What I want is this:

list_of_args = [array1, array2, array3]
stats.f_oneway(array1,array2,array3)
Kwong
  • 11
  • 4
  • Will this work for you? https://stackoverflow.com/questions/4979542/python-use-list-as-function-parameters – Evan Jan 10 '18 at 19:46
  • This has been asked before, but you want to do `stats.f_oneway(*list_of_args)` – Imran Jan 10 '18 at 19:46
  • Thank you Imran and Evan! I just couldn't come up with the correct terms to search for no matter how I tried!!! – Kwong Jan 10 '18 at 19:52

0 Answers0