Skip to content

Commit e1ccef6

Browse files
author
Kei
committed
Preserve_dtype if argument is passed in, else don't preserve
1 parent 712c36a commit e1ccef6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/groupby/ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ def agg_series(
921921

922922
if isinstance(obj._values, ArrowExtensionArray):
923923
out = maybe_cast_pointwise_result(
924-
npvalues, obj.dtype, numeric_only=True, same_dtype=False
924+
npvalues, obj.dtype, numeric_only=True, same_dtype=preserve_dtype
925925
)
926926
import pyarrow as pa
927927

0 commit comments

Comments
 (0)