-
Hello, I'm not sure if this feature exists or not, but I would like to know if it's possible to pass a string to
From the docstring, it seems that the method only accept Thank you very much. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
additional keyword-arguments are passed through (this is what ds.reduce(aggregate, aggregation_method="mean") you could also use ds.reduce(functools.partial(aggregate, aggregation_method="mean"))
ds.reduce(lambda ds_: aggregate(ds_, "mean")) Edit: if getattr(ds, aggregation_method)() |
Beta Was this translation helpful? Give feedback.
additional keyword-arguments are passed through (this is what
**kwargs
in the docstring is referring to):you could also use
functools.partial
or alambda
to create a function that has that parameter pre-set:Edit: if
aggregation_method
is the name of a method on the dataset, we can also do: