-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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 with nullable datatypes a non-null validity #57665
Conversation
9f21f8c
to
790b02b
Compare
@pytest.mark.parametrize( | ||
"dtype", ["Int8", pytest.param("Int8[pyarrow]", marks=td.skip_if_no("pyarrow"))] | ||
) | ||
def test_nullable_integers(dtype: str) -> None: | ||
def test_nullable_integers() -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
splitting the pyarrow dtype out of this test so I can xfail it
4644b7a
to
3bf21ef
Compare
def test_nullable_integers(dtype: str) -> None: | ||
def test_nullable_integers() -> None: | ||
# https://github.com/pandas-dev/pandas/issues/55069 | ||
df = pd.DataFrame({"a": [1]}, dtype="Int8") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you include a None
in here to test null?
And parametrize over ["Int8", "Float32", "boolean"]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boolean isn't supported yet, there's a separate issue about that: #55332
sure, I've added a separate test test_pandas_nullable_w_missing_values
which includes a null
doc/source/whatsnew/v2.2.1.rst
Outdated
@@ -19,6 +19,7 @@ Enhancements | |||
|
|||
Fixed regressions | |||
~~~~~~~~~~~~~~~~~ | |||
- :meth:`DataFrame.__dataframe__` was producing incorrect data buffers when the a column's type was a pandas nullable on with missing values (:issue:`56702`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh actually. I guess we need a 2.2.2 whatsnew first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah right, 2.2.1 is already out, sorry about that, thanks for spotting it
Thanks @MarcoGorelli |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
…pandas-dev#57665) * BUG: interchange protocol with nullable datatypes a non-null validity provides nonsense results * whatsnew * 🏷️ typing * parametrise over more types * move whatsnew (cherry picked from commit 03717bc)
…pandas-dev#57665) * BUG: interchange protocol with nullable datatypes a non-null validity provides nonsense results * whatsnew * 🏷️ typing * parametrise over more types * move whatsnew (cherry picked from commit 03717bc)
…llable datatypes a non-null validity) (#57769) BUG: interchange protocol with nullable datatypes a non-null validity (#57665) * BUG: interchange protocol with nullable datatypes a non-null validity provides nonsense results * whatsnew * 🏷️ typing * parametrise over more types * move whatsnew (cherry picked from commit 03717bc)
…pandas-dev#57665) * BUG: interchange protocol with nullable datatypes a non-null validity provides nonsense results * whatsnew * 🏷️ typing * parametrise over more types * move whatsnew
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.This deals with pandas nullable dtypes
pyarrow nullables ones will require changes to the PandasBuffer class, so I'll handle those separately