Skip to content

Commit

Permalink
fixup! Fix pandas.api.extensions.ExtensionArray._reduce
Browse files Browse the repository at this point in the history
  • Loading branch information
ivonastojanovic committed Aug 6, 2024
1 parent 208eb0b commit f82d11e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pandas/core/arrays/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2049,11 +2049,11 @@ def _reduce(
>>> pd.array([1, 2, 3])._reduce("sum")
6
>>> pd.array([1, 2, 3])._reduce("mean")
2
2.0
>>> pd.array([1, 2, 3])._reduce("median")
2
2.0
>>> pd.array([1, 2, 3])._reduce("mean", keepdims=True)
array([2])
array([2.0])
>>> pd.array([1, np.nan, 2, np.nan])._reduce("sum", skipna=False)
nan
>>> pd.array([1, np.nan, 2, np.nan])._reduce("sum", skipna=True)
Expand Down

0 comments on commit f82d11e

Please sign in to comment.