-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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: pd.NA showing up as NaN in Categorical repr #52681
Conversation
I have been thinking about a change to the use of the na value in |
Sure, happy to see what you got. Feel free to take my test(or any parts of this PR) if you need it. |
def test_categorical_repr_nullable_int_NA(self, values_dtype): | ||
arr = array([1, 2, np.nan], dtype=values_dtype) | ||
c = Categorical(arr) | ||
c_exp = f"""[1, 2, {NA}]\nCategories (2, {values_dtype}): [1, 2]""" |
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.
so if you did c[2]
would you get pd.NA or np.nan? i'm wary of changing the repr without changing the item
This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this. |
Looks like this has gone stale. Closing to clear the queue but feel free to reopen if you want to continue |
FYI, there is a slightly related #53190, which isn’t getting traction though… |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.