-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG&TST: df.replace fail after converting to new dtype #31545
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
This was solved by #31484 and here add a test to prove it works now, and thus close the issue, i think a whatsnew is not needed in this case |
|
||
def test_replace_after_convert_dtypes(self): | ||
# GH31517 | ||
df = pd.DataFrame({"grp": [1, 2, 3, 4, 5]}) |
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.
I would just specify it here as dtype="Int64"
instead of using convert_dtypes
(in the end, the issue was that replace didn't work with Int64 data, the convert_dtypes was just a way to get such 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.
oh yeah, i was copying-pasting the example in issue description, sorry for my laziness. 😅 changed!
…ng to new dtype
thanks @charlesdong1991 backporting this to ensure that 1.0.x is tested as well. |
…ng to new dtype
…dtype (#31584) Co-authored-by: Kaiqi Dong <kaiqidong1991@gmail.com>
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff