You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/07/10 15:50:39 UTC
[GitHub] [beam] TheNeuralBit commented on a diff in pull request #22174: Parallelizable DataFrame/Series mean
TheNeuralBit commented on code in PR #22174:
URL: https://github.com/apache/beam/pull/22174#discussion_r917413791
##########
sdks/python/apache_beam/dataframe/frames.py:
##########
@@ -1577,6 +1578,17 @@ def std(self, *args, **kwargs):
# Compute variance (deferred scalar) with same args, then sqrt it
return self.var(*args, **kwargs).apply(lambda var: math.sqrt(var))
+ @frame_base.with_docs_from(pd.Series)
+ @frame_base.args_to_kwargs(pd.Series)
+ @frame_base.populate_defaults(pd.Series)
+ def mean(self, skipna, **kwargs):
Review Comment:
That's actually what the decorators do - populate_defaults pulls the default values from the panda implementation of the function, so we don't have to duplicate them here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org