I can't find anything on this in the documentation or on SO yet…
Given:
def applied_func(row, list_of_values):
for val in list_of_values:
// do something generative
return generated_thing
list_for_applied_func = ['foo', 'bar', 'baz']
df['computed value'] = df.apply(applied_func, args=(list_for_applied_func), axis=1))
I get the unexpected error "applied_func() takes 2 positional arguments but 4 were given. This tells me that it is auto-unpacking list_of_applied_func in the above. How is one to treat the list passed as an argument as a list for use in the computed function?