-
-
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: DataFrame Interchange Protocol errors on Boolean columns #55332
Comments
…lled (#3210) * Work around pandas-dev/pandas#55332 * Only test boolean column with pandas >= 1.0.0
Thanks for bringing the issue to our attention. As you can see in the definition of I'm about to open a PR to raise a pandas/pandas/core/interchange/column.py Lines 130 to 149 in 6f0cd8d
|
thanks for the report, thanks Paul Reece for your PR are we sure this is the solution? I think rather we should support nullable dtypes in the interchange protocol |
Makes sense! |
Anyone else can feel free to open a PR supporting nullable dtypes for the interchange protocol! I'll try to get to it eventually time permitting but if you have time now go for it! |
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
Issue Description
When converting a pandas DataFrame using the DataFrame Interchange Protocol, boolean columns result in an exception:
Expected Behavior
I expect the example above to successfully convert the pandas DataFrame to an Arrow table using the DataFrame Interchange Protocol.
Originally reported in the Vega-Altair project as vega/altair#3205
If it's not straightforward to support boolean columns, I would ask that an explicit
NotImplementedException
be raised (instead of anAttributeError
). Vega-Altair uses this as an indication to fall back to an alternative implementation.Installed Versions
INSTALLED VERSIONS
commit : e86ed37
python : 3.10.12.final.0
python-bits : 64
OS : Darwin
OS-release : 23.0.0
Version : Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:43 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6000
machine : arm64
processor : arm
byteorder : little
LC_ALL : None
LANG : None
LOCALE : en_US.UTF-8
pandas : 2.1.1
numpy : 1.23.4
pytz : 2023.3
dateutil : 2.8.2
setuptools : 68.0.0
pip : 23.2
Cython : None
pytest : 7.2.0
hypothesis : None
sphinx : 5.3.0
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.2
IPython : 8.5.0
pandas_datareader : None
bs4 : 4.11.1
bottleneck : None
dataframe-api-compat: None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 13.0.0
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : 2.0.19
tables : None
tabulate : 0.9.0
xarray : None
xlrd : None
zstandard : None
tzdata : 2023.3
qtpy : None
pyqt5 : None
The text was updated successfully, but these errors were encountered: