Pandas version checks
-
[x] I have checked that this issue has not already been reported.
-
[x] I have confirmed this bug exists on the latest version of pandas.
-
[x] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
import pandas as pd, pint_pandas
s = pd.Series([1, 2, 3], dtype='pint[kg]')
s.describe()
DimensionalityError Traceback (most recent call last)
...
Issue Description
https://github.com/hgrecco/pint-pandas/issues/279
Series.describe
sets the dtype for the results to Float64Dtype
when the input is an EA. pint's Quantity
cannot be casted to Float64Dtype
. https://github.com/pandas-dev/pandas/blob/35b0d1dcadf9d60722c055ee37442dc76a29e64c/pandas/core/methods/describe.py#L255
Expected Behavior
.describe should return a Series of objectdtype, or the dtype of the EA
Installed Versions
Replace this line with the output of pd.show_versions()