Description
Pandas version checks
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pandas.
-
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
import pandas as pd
import numpy as np
df = pd.DataFrame(data={"A": [np.nan, 1]}, dtype="double[pyarrow]")
df.aggregate(lambda x: x.mean()).dtypes
Issue Description
The input is a dataframe with a pyarrow backend but the output uses numpy float64.
This behaviour is very inconsistent especially considering that, if called like this: df.aggregate("mean").dtypes
the output is a "double[pyarrow]".
Expected Behavior
I expect the returned dtypes to be double[pyarrow], since pyarrow type was given as input (based on #53831).
Installed Versions
pandas : 2.3.1
numpy : 2.2.5
pytz : 2025.2
dateutil : 2.9.0.post0
pip : 25.1.1
Cython : None
sphinx : 8.2.3
IPython : 9.2.0
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : 4.13.4
blosc : None
bottleneck : None
dataframe-api-compat : None
fastparquet : None
fsspec : None
html5lib : None
hypothesis : None
gcsfs : None
jinja2 : 3.1.6
lxml.etree : 5.4.0
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : 3.1.5
pandas_gbq : None
psycopg2 : None
pymysql : None
pyarrow : 20.0.0
pyreadstat : None
pytest : 8.3.5
python-calamine : None
pyxlsb : None
s3fs : None
scipy : 1.15.3
sqlalchemy : 2.0.40
tables : None
tabulate : 0.9.0
xarray : 2025.4.0
xlrd : 2.0.1
xlsxwriter : 3.2.5
zstandard : None
tzdata : 2025.2
qtpy : None
pyqt5 : None