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 2020/08/13 23:59:59 UTC

[GitHub] [beam] robertwb commented on a change in pull request #12534: [BEAM-9547] Implement some methods for deferred Series.

robertwb commented on a change in pull request #12534:
URL: https://github.com/apache/beam/pull/12534#discussion_r470311824



##########
File path: sdks/python/apache_beam/dataframe/frames.py
##########
@@ -29,9 +29,46 @@ def __array__(self, dtype=None):
     raise frame_base.WontImplementError(
         'Conversion to a non-deferred a numpy array.')
 
+  astype = frame_base._elementwise_method('astype')
+
+  between = frame_base._elementwise_method('between')
+
+  @frame_base.args_to_kwargs(pd.Series)
+  @frame_base.populate_defaults(pd.Series)
+  @frame_base.maybe_inplace
+  def dropna(self, **kwargs):
+    return frame_base.DeferredFrame.wrap(
+        expressions.ComputedExpression(
+            'dropna',
+            lambda df: df.dropna(**kwargs), [self._expr],
+            preserves_partition_by=partitionings.Singleton(),
+            requires_partition_by=partitionings.Nothing()))

Review comment:
       Ah, yeah, that wasn't updated when the arguments chagned. Fixed. 




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org