Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop kwargs from Series.count #14106

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -2549,7 +2549,7 @@ def apply(self, func, convert_dtype=True, args=(), **kwargs):
# Stats
#
@_cudf_nvtx_annotate
def count(self, level=None, **kwargs):
def count(self, level=None):
"""
Return number of non-NA/null observations in the Series

Expand Down
6 changes: 6 additions & 0 deletions python/cudf/cudf/tests/test_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -2311,3 +2311,9 @@ def test_series_round_builtin(data, digits):
actual = round(gs, digits)

assert_eq(expected, actual)


def test_series_count_invalid_param():
s = cudf.Series([])
with pytest.raises(TypeError):
s.count(skipna=True)
2 changes: 1 addition & 1 deletion python/dask_cudf/dask_cudf/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def _naive_var(ddf, meta, skipna, ddof, split_every, out):
def _parallel_var(ddf, meta, skipna, split_every, out):
def _local_var(x, skipna):
if skipna:
n = x.count(skipna=skipna)
n = x.count()
avg = x.mean(skipna=skipna)
else:
# Not skipping nulls, so might as well
Expand Down
Loading