diff --git a/python/cudf/cudf/core/series.py b/python/cudf/cudf/core/series.py index f44a3123dd3..7692d3015f8 100644 --- a/python/cudf/cudf/core/series.py +++ b/python/cudf/cudf/core/series.py @@ -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 diff --git a/python/cudf/cudf/tests/test_series.py b/python/cudf/cudf/tests/test_series.py index 798809b0ada..b1e991106ee 100644 --- a/python/cudf/cudf/tests/test_series.py +++ b/python/cudf/cudf/tests/test_series.py @@ -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) diff --git a/python/dask_cudf/dask_cudf/core.py b/python/dask_cudf/dask_cudf/core.py index d2858876fcd..5b37e6e825c 100644 --- a/python/dask_cudf/dask_cudf/core.py +++ b/python/dask_cudf/dask_cudf/core.py @@ -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