We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1337ccb commit 4ec7ac4Copy full SHA for 4ec7ac4
pandas/core/groupby/groupby.py
@@ -1727,7 +1727,7 @@ def _agg_py_fallback(
1727
dtype = ser.dtype
1728
if dtype == object:
1729
res_values = res_values.astype(object, copy=False)
1730
- elif is_string_dtype(dtype) and how in ["min", "max"]:
+ elif is_string_dtype(dtype):
1731
# mypy doesn't infer dtype is an ExtensionDtype
1732
string_array_cls = dtype.construct_array_type() # type: ignore[union-attr]
1733
res_values = string_array_cls._from_sequence(res_values, dtype=dtype)
0 commit comments