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 2021/06/18 23:59:01 UTC

[GitHub] [beam] TheNeuralBit commented on a change in pull request #15019: [BEAM-12495] Fail early when attempting to group multiple columns with dropna=False

TheNeuralBit commented on a change in pull request #15019:
URL: https://github.com/apache/beam/pull/15019#discussion_r654719294



##########
File path: sdks/python/apache_beam/dataframe/frames.py
##########
@@ -3187,6 +3187,13 @@ def __init__(self, expr, kwargs,
     self._grouping_indexes = grouping_indexes
     self._kwargs = kwargs
 
+    if (self._kwargs.get('dropna', True) is False and
+        self._ungrouped.proxy().index.nlevels > 1):
+      raise NotImplementedError(
+          "dropna=False does not work as intended in the Beam DataFrame API "
+          "when grouping on multiple columns or indexes (See BEAM-12495).")

Review comment:
       I think that might be confusing since the upstream bug is _just_ when grouping by index levels, but our users will encounter it  even when grouping on columns since we move columns to the index.




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