Skip to content

Commit f82d11e

Browse files
fixup! Fix pandas.api.extensions.ExtensionArray._reduce
1 parent 208eb0b commit f82d11e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/core/arrays/base.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2049,11 +2049,11 @@ def _reduce(
20492049
>>> pd.array([1, 2, 3])._reduce("sum")
20502050
6
20512051
>>> pd.array([1, 2, 3])._reduce("mean")
2052-
2
2052+
2.0
20532053
>>> pd.array([1, 2, 3])._reduce("median")
2054-
2
2054+
2.0
20552055
>>> pd.array([1, 2, 3])._reduce("mean", keepdims=True)
2056-
array([2])
2056+
array([2.0])
20572057
>>> pd.array([1, np.nan, 2, np.nan])._reduce("sum", skipna=False)
20582058
nan
20592059
>>> pd.array([1, np.nan, 2, np.nan])._reduce("sum", skipna=True)

0 commit comments

Comments
 (0)