Skip to content
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: edge case when masking "null[pyarrow]" pd.Series #58696

Open
2 of 3 tasks
lukaszkolodziejczyk opened this issue May 13, 2024 · 1 comment
Open
2 of 3 tasks

BUG: edge case when masking "null[pyarrow]" pd.Series #58696

lukaszkolodziejczyk opened this issue May 13, 2024 · 1 comment
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@lukaszkolodziejczyk
Copy link

lukaszkolodziejczyk commented May 13, 2024

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

import pandas as pd
pd.Series([pd.NA], dtype="null[pyarrow]").mask([True], pd.NA)

Issue Description

It fails in the following way:

/Users/runner/work/crossbow/crossbow/arrow/cpp/src/arrow/result.cc:28: Constructed with a non-error status: OK

Process finished with exit code 134 (interrupted by signal 6:SIGABRT)

Expected Behavior

I'd expect it to return:
pd.Series([pd.NA], dtype="null[pyarrow]")

Installed Versions

INSTALLED VERSIONS ------------------ commit : d9cdd2e python : 3.11.0.final.0 python-bits : 64 OS : Darwin OS-release : 23.1.0 Version : Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000 machine : arm64 processor : arm byteorder : little LC_ALL : None LANG : None LOCALE : None.UTF-8

pandas : 2.2.2
numpy : 1.26.4
pytz : 2024.1
dateutil : 2.9.0.post0
setuptools : 69.5.1
pip : 24.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader : None
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : None
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 : 16.0.0
pyreadstat : None
python-calamine : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2024.1
qtpy : None
pyqt5 : None

@lukaszkolodziejczyk lukaszkolodziejczyk added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels May 13, 2024
@rob-sil
Copy link
Contributor

rob-sil commented May 27, 2024

Could this be an upstream bug in PyArrow? I get the same error when running the no-pandas version:

import pyarrow as pa
import pyarrow.compute as pc

mask = pa.array([True])
values = pa.array([None])
pc.replace_with_mask(values, mask, pa.NA)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

No branches or pull requests

2 participants