BUG: Inconsistent return types for PandasArray and Series reductions #35475
Labels
API - Consistency
Internal Consistency of API/Behavior
Bug
Reduction Operations
sum, mean, min, max, etc.
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas (
1.1.0
)(optional) I have confirmed this bug exists on the master branch of pandas. (
3b1d4f1eef46a45b7d32694bb263a2e40a933e74
)Code Sample, a copy-pastable example
Problem description
As shown above, the return types for
PandasArray
s is highly inconsistent within the case as well as compared to the non-empty case.This also extends to the
Series
cases, where I don't understand the behavior at all, especially when looking the outputs frommaster
.Expected Output
A single output type (either
np.float64
) orpd.NA
? To be honest, I am not sure what the expected outcome is, but it would be good to clarify that because other extension arrays should probably implement the same behavior.Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: