-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST: Retyping of categorical column with NaN #60112
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
TST: Retyping of categorical column with NaN #60112
Conversation
SpoopyPillow
commented
Oct 28, 2024
•
edited
Loading
edited
- closes BUG: v1.3.0 Introduces Unexpected Retyping of Categorical Column with NaN inside #43996
- All code checks passed.
pandas/tests/dtypes/test_dtypes.py
Outdated
expected = pd.DataFrame({"a": Categorical([1], [1]), "b": [1]}) | ||
assert df["a"].dtype == "category" | ||
|
||
df.loc[0, "a"] = 1 |
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.
From the issue, this should test assigning a numpy array with an integer not just an integer
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 right, I'll get that changed
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.
One comment otherwise looks good
Co-authored-by: Matthew Roeschke <[email protected]>
Thanks @SpoopyPillow |