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
df = pd.DataFrame({"A": pd.Series([1,2,3], dtype="Int64"), "B": pd.Series([1,2,3], dtype="int64")})
df.describe(include="int64")
A B
count 3.0 3.0
mean 2.0 2.0
std 1.0 1.0
min 1.0 1.0
25% 1.5 1.5
50% 2.0 2.0
75% 2.5 2.5
max 3.0 3.0
```
Issue Description
Should only include B
, not both
Expected Behavior
remove A from result
Installed Versions
main
Comment From: jbrockmendel
Notes for whoever comes along to handle this:
1) In infer_dtype_from_object there is a kludge for BaseMaskedDtype if hasattr(dtype, "numpy_dtype"):
2) In select_dtypes there is a kludge for ArrowDtype
I expect resolving this issue will require a significant surgery on these two functions, so avoiding these kludges should be part of the goal.
Comment From: phofl
Yes, the kludge was a necessary fix for 2.0.1