From ed5c2c297f27c28c3aa4066248f9e93c989b81a8 Mon Sep 17 00:00:00 2001 From: Daniel Saxton <> Date: Fri, 6 Sep 2019 16:51:46 -0500 Subject: [PATCH 1/3] Clean error message --- pandas/core/groupby/ops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/groupby/ops.py b/pandas/core/groupby/ops.py index bcda25bf3ce39..d5d1c50f34c6f 100644 --- a/pandas/core/groupby/ops.py +++ b/pandas/core/groupby/ops.py @@ -464,7 +464,7 @@ def _cython_operation(self, kind, values, how, axis, min_count=-1, **kwargs): # are not setup for dim transforming if is_categorical_dtype(values) or is_sparse(values): raise NotImplementedError( - "{} are not support in cython ops".format(values.dtype) + "{} are not supported in Cython operations".format(values.dtype) ) elif is_datetime64_any_dtype(values): if how in ["add", "prod", "cumsum", "cumprod"]: From d81d90b664b97eb89b8f857d1afd25028e379c31 Mon Sep 17 00:00:00 2001 From: Daniel Saxton <> Date: Fri, 6 Sep 2019 20:56:35 -0500 Subject: [PATCH 2/3] Edit message --- pandas/core/groupby/ops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/groupby/ops.py b/pandas/core/groupby/ops.py index d5d1c50f34c6f..02d5586f2288b 100644 --- a/pandas/core/groupby/ops.py +++ b/pandas/core/groupby/ops.py @@ -464,7 +464,7 @@ def _cython_operation(self, kind, values, how, axis, min_count=-1, **kwargs): # are not setup for dim transforming if is_categorical_dtype(values) or is_sparse(values): raise NotImplementedError( - "{} are not supported in Cython operations".format(values.dtype) + "{} dtype not supported".format(values.dtype) ) elif is_datetime64_any_dtype(values): if how in ["add", "prod", "cumsum", "cumprod"]: From c43ae34f93ba9b1b20d2f87ebc1e2cf386a8b87a Mon Sep 17 00:00:00 2001 From: Daniel Saxton <> Date: Sat, 7 Sep 2019 09:06:00 -0500 Subject: [PATCH 3/3] Format --- pandas/core/groupby/ops.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pandas/core/groupby/ops.py b/pandas/core/groupby/ops.py index 02d5586f2288b..1a3f0da3cf92b 100644 --- a/pandas/core/groupby/ops.py +++ b/pandas/core/groupby/ops.py @@ -463,9 +463,7 @@ def _cython_operation(self, kind, values, how, axis, min_count=-1, **kwargs): # categoricals are only 1d, so we # are not setup for dim transforming if is_categorical_dtype(values) or is_sparse(values): - raise NotImplementedError( - "{} dtype not supported".format(values.dtype) - ) + raise NotImplementedError("{} dtype not supported".format(values.dtype)) elif is_datetime64_any_dtype(values): if how in ["add", "prod", "cumsum", "cumprod"]: raise NotImplementedError(