yeandy commented on a change in pull request #16590:
URL: https://github.com/apache/beam/pull/16590#discussion_r791778383



##########
File path: sdks/python/apache_beam/dataframe/frames.py
##########
@@ -4120,6 +4126,22 @@ def dtypes(self):
     grouping_columns = self._grouping_columns
     return self.apply(lambda df: df.drop(grouping_columns, axis=1).dtypes)
 
+  @frame_base.with_docs_from(DataFrameGroupBy)
+  def value_counts(self, subset=None, sort=False, normalize=False,
+                    ascending=False, dropna=True):
+    return frame_base.DeferredFrame.wrap(
+        expressions.ComputedExpression(
+            'value_counts',
+            lambda df: df.value_counts(
+              subset=subset,
+              sort=sort,
+              normalize=normalize,
+              ascending=ascending,
+              dropna=True), [self._expr],
+            preserves_partition_by=partitionings.Arbitrary(),
+            requires_partition_by=partitionings.Arbitrary())

Review comment:
       How should we do the partitioning?




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to