-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Interchange protocol fails with pyarrow backed types #52323
Comments
pandas/pandas/core/interchange/utils.py Line 81 in 44eb283
pd.Series([datetime.now()], dtype='date32[pyarrow]').dtype.name.upper()
Out[36]: 'DATE32[DAY][PYARROW]' Since the dtype name contains |
I added the
|
Thanks for the report. The interchange protocol was first implemented with numpy dtypes in mind. I suspect all arrow backed types will have a similar error |
I encountered a similar error |
Now it appears this is failing on the pyarrow side so going to close as an upstream issue File /opt/miniconda3/envs/pandas-dev/lib/python3.10/site-packages/pyarrow/interchange/from_dataframe.py:324, in parse_datetime_format_str(format_str)
320 unit += "s"
322 return unit, tz
--> 324 raise NotImplementedError(f"DateTime kind is not supported: {format_str}")
NotImplementedError: DateTime kind is not supported: tdD |
Pandas version checks
Reproducible Example
Issue Description
Conversion of a dataframe containing
date32
to pyarrow table throws an exception.Expected Behavior
date32[day][pyarrow]
should be able to be converted back to a pyarrow table.Installed Versions
INSTALLED VERSIONS
commit : ceef0da
python : 3.11.1.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19043
machine : AMD64
processor : Intel64 Family 6 Model 158 Stepping 9, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : English_Indonesia.1252
pandas : 2.1.0.dev0+368.gceef0da443
numpy : 1.24.2
pytz : 2022.6
dateutil : 2.8.2
setuptools : 65.6.3
pip : 23.0.1
Cython : 0.29.32
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.9.2
html5lib : 1.1
pymysql : None
psycopg2 : 2.9.5
jinja2 : 3.1.2
IPython : 8.6.0
pandas_datareader: None
bs4 : 4.11.1
bottleneck : 1.3.7
brotli : 1.0.9
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : 3.7.1
numba : None
numexpr : 2.8.4
odfpy : None
openpyxl : 3.1.0
pandas_gbq : None
pyarrow : 11.0.0
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.10.1
snappy : None
sqlalchemy : 1.4.45
tables : None
tabulate : None
xarray : None
xlrd : 2.0.1
zstandard : None
tzdata : 2022.6
qtpy : 2.3.0
pyqt5 : None
The text was updated successfully, but these errors were encountered: