Skip to content

BUG: fixed fillna('') on a Int64 column causes TypeError: <U3 cannot b… #44870

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

Closed
wants to merge 1 commit into from

Conversation

aditzkabitz
Copy link

…e converted to an IntegerDtype(#44289)

this contribution is for a class project and need not be accepted but feedback is always appreciated

)
df.fillna("nan")

expected = df = DataFrame(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably don't want to set both df and expected in this line?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same in each case below

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I don't remember setting both df and expected like that - might have been a product of running pre-commit or something else? I can try to change this asap.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't imagine the pre-commit tooling doing this. most likely just a typo. happens to us all.

if dtype == "Int64":
dtype = "int64"
elif dtype == "Float64":
dtype = "float64"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is going to change behavior in an unwanted way. The issue is with 'fillna' with an Int64 dtype, not the existence of Int64 dtypes

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed - as mentioned above in the description this contribution is for a final class project. Just trying to get a feel for contributing to open source software.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you planning to follow-up on this? That's an important part of the contribution process!

@jreback jreback added Dtype Conversions Unexpected or buggy dtype conversions Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate labels Dec 27, 2021
@jreback
Copy link
Contributor

jreback commented Jan 16, 2022

@aditzkabitz can you merge master and address comments

@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot added the Stale label Feb 16, 2022
@mroeschke
Copy link
Member

Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in main, address the comments and we can reopen.

@mroeschke mroeschke closed this Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: fillna('') on a Int64 column causes TypeError: <U3 cannot be converted to an IntegerDtype
4 participants