-
|
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
**kwargsin the docstring is referring to):you could also use
functools.partialor alambdato create a function that has that parameter pre-set:Edit: if
aggregation_methodis the name of a method on the dataset, we can also do: