BUG: is_integer_dtype returns False for integer ArrowDtypes · Issue #50667 · pandas-dev/pandas (original) (raw)

@jrbourbeau

Pandas version checks

Reproducible Example

import pandas as pd s = pd.Series([1, 2, 3], dtype="int64[pyarrow]") result = pd.api.types.is_integer_dtype(s.dtype) print(f"{result = }")

Issue Description

Similar to #50563, but for is_integer_dtype returning False when int-based arrow dtypes are input.

Expected Behavior

I'd expect is_integer_dtype to return True for int64[pyarrow], int32[pyarrow], etc.

Installed Versions

INSTALLED VERSIONS
------------------
commit           : 5115f0964a47c116e3899156ec6ccfd02c58960e
python           : 3.10.4.final.0
python-bits      : 64
OS               : Darwin
OS-release       : 22.2.0
Version          : Darwin Kernel Version 22.2.0: Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64
machine          : x86_64
processor        : i386
byteorder        : little
LC_ALL           : None
LANG             : en_US.UTF-8
LOCALE           : en_US.UTF-8

pandas           : 2.0.0.dev0+1129.g5115f0964a
numpy            : 1.24.0
pytz             : 2022.1
dateutil         : 2.8.2
setuptools       : 59.8.0
pip              : 22.0.4
Cython           : None
pytest           : 7.1.3
hypothesis       : None
sphinx           : 4.5.0
blosc            : None
feather          : None
xlsxwriter       : None
lxml.etree       : None
html5lib         : 1.1
pymysql          : None
psycopg2         : None
jinja2           : 3.1.2
IPython          : 8.2.0
pandas_datareader: None
bs4              : 4.11.1
bottleneck       : None
brotli           :
fastparquet      : 2022.12.1.dev5
fsspec           : 2022.10.0
gcsfs            : None
matplotlib       : 3.5.1
numba            : None
numexpr          : 2.8.0
odfpy            : None
openpyxl         : None
pandas_gbq       : None
pyarrow          : 11.0.0.dev316
pyreadstat       : None
pyxlsb           : None
s3fs             : 2022.10.0
scipy            : 1.9.0
snappy           :
sqlalchemy       : 1.4.35
tables           : 3.7.0
tabulate         : None
xarray           : 2022.3.0
xlrd             : None
zstandard        : None
tzdata           : None
qtpy             : None
pyqt5            : None