0

apply method in pandas.DataFrame has signature like this: DataFrame.apply(func, axis=0, broadcast=False, raw=False, reduce=None, args=(), **kwds) If I have a function with parameter, how can I pass this function to apply? For example, the function is: def foo(x, activation = 3.0): ... return calculated_val When I set args = 5, there is an error says, *args must be an iterable.

Aperion
  • 273
  • 3
  • 7

0 Answers0