-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: pandas int extension dtypes has no attribute byteorder #57173
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
Conversation
pandas/core/interchange/column.py
Outdated
@@ -143,6 +146,8 @@ def _dtype_from_pandasdtype(self, dtype) -> tuple[DtypeKind, int, str, str]: | |||
byteorder = dtype.numpy_dtype.byteorder | |||
elif isinstance(dtype, DatetimeTZDtype): | |||
byteorder = dtype.base.byteorder # type: ignore[union-attr] | |||
elif is_extension_array_dtype(dtype): |
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 check BaseMaskedDtype
instead?
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.
looks good
@pytest.mark.parametrize("dtype", ["Int8", "Int8[pyarrow]"]) | ||
def test_nullable_integers(dtype: str) -> None: | ||
# https://github.com/pandas-dev/pandas/issues/55069 | ||
pytest.importorskip("pyarrow") |
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.
We only need to skip for the second case no? Any reason we don't just use pytest.param("Int8[pyarrow], marks=td.skip_if_no("pyarrow"))
?
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.
because I didn't know you could do that 🙈
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. |
… attribute byteorder
…ev#57173) * support nullable integers in from_dataframe * gh issue number * use BaseMaskedDtype * only skip if int8[pyarrow]
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.