I have a function that expects several pandas Series as arguments:
def func(s1, s2, s3):
print(s1, s2, s3)
And a DataFrame df with columns 'A' through 'Z'.
I would like to call the function like this:
func(*df[['A', 'D', 'R']])
But it appears that unpacking a DataFrame produces just the column names, not the data. I know that Using the double star I can get the three desired series in a dictionary, but then the names have to match, so that doesn't work here.
Is there a concise syntax for what I want to do?
Bonus question: does the python community call the * and ** splat and double-splat? This is a very difficult topic to search for!