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 02:36:08 UTC

[GitHub] [beam] AnandInguva commented on a diff in pull request #22174: Parallelizable DataFrame/Series mean

AnandInguva commented on code in PR #22174:
URL: https://github.com/apache/beam/pull/22174#discussion_r917328278


##########
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:
   Can we make `skipna` as keyword argument?
   ```suggestion
     def mean(self, skipna=True, **kwargs):
   ```



##########
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:
   Following this https://pandas.pydata.org/docs/reference/api/pandas.Series.mean.html#pandas.Series.mean



-- 
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