#67928·pandas

API: Add reduction methods to ExtensionArray

Author: Julian-HarbeckCreated Sep 2, 2026Updated Sep 17, 2026
LabelsAPI DesignExtensionArrayExtensionArray - New Method Request

This is a follow-up to #64450 which was implemented in #63512. The PR implemented reduction methods like sum, min, mean, ... for some internal EAs. It also implements the BaseReduceTests::test_reduce_array test function which expects that all EAs implement these methods but they are not part of the public EA API yet. The topic about adding these reduction methods to the API was discussed in the developer meeting on 2026-08-26 with the following opinions expressed by the participants:

  • Participants are on board for adding these
  • Some participants like the idea of following up by removing the EA._reduce indirection. There’s some concern about the deprecation path for that

At the moment the _reduce method by default already dispatches to the reduction methods if they are implemented: https://github.com/pandas-dev/pandas/blob/964b99e97a9856a66fdec90f8eede7d9a6301324/pandas/core/arrays/base.py#L2478-L2483

From that a possible deprecation path could be to implement the reduction methods (raising TypeError or NotImplemented by default). However at the moment some of our internal EAs currently implement the functionality in _reduce and dispatch from the reduction methods to that, e.g. in BaseMaskedArray: https://github.com/pandas-dev/pandas/blob/964b99e97a9856a66fdec90f8eede7d9a6301324/pandas/core/arrays/masked.py#L1840-L1843

Due to the current implementation of _reduce we cannot implement the base reduction methods like BaseMaskedArray to resolve to _reduce as that would create a RecursionError.

For external EAs that currently use a similar pattern to BaseMaskedArray that would mean that the test_reduce_array test currently still fails, because self._supports_reduction likely returns True, but res_op = getattr(ser.array, op_name) will raise the error specified in the base class. I think that would be okay, because then external EA developer are informed to implement / overwrite the base methods. Maybe there could be an additional comment in test notifying developers that _reduce will eventually be deprecated?

@rhshadrach @jbrockmendel Would welcome your feedback on the desired approach, implementation then should be relatively straight forward.