Skip to content

Commit

Permalink
[BEAM-9547] Add tests for groupby(dropna) (#14553)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNeuralBit authored Apr 16, 2021
1 parent 87effb2 commit 3d4db26
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sdks/python/apache_beam/dataframe/frames_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,14 @@ def test_quantile_axis_columns(self):
r"df\.quantile\(q=0\.1, axis='columns'\)"):
self._run_test(lambda df: df.quantile([0.1, 0.5], axis='columns'), df)

@unittest.skipIf(PD_VERSION < (1, 1), "drop_na added in pandas 1.1.0")
def test_groupby_count_na(self):
# Verify we can do a groupby.count() that doesn't drop NaN values
self._run_test(
lambda df: df.groupby('foo', dropna=True).bar.count(), GROUPBY_DF)
self._run_test(
lambda df: df.groupby('foo', dropna=False).bar.count(), GROUPBY_DF)


class AllowNonParallelTest(unittest.TestCase):
def _use_non_parallel_operation(self):
Expand Down

0 comments on commit 3d4db26

Please sign in to comment.