Skip to content

BUG: read_csv converting nans to 1 when casting bools to float #44901

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

Merged
merged 2 commits into from
Dec 17, 2021

Conversation

phofl
Copy link
Member

@phofl phofl commented Dec 15, 2021

This is mostly based on #42944, but would like to get this into 1.4

cc @joelgibson if you would like to continue your initial pr

The xfail pyarrow case is not really related to the pyarrow engine, but to df.astype("bool") casting NaN to False

@phofl phofl added IO CSV read_csv, to_csv Dtype Conversions Unexpected or buggy dtype conversions Error Reporting Incorrect or improved errors from pandas labels Dec 15, 2021
@jreback jreback added this to the 1.4 milestone Dec 16, 2021
@jreback
Copy link
Contributor

jreback commented Dec 16, 2021

cc @gfyoung if any comments

@joelgibson
Copy link
Contributor

Sorry about dropping out on this, got swamped by work. Thanks for bringing it forward @phofl.

@jreback jreback merged commit 788ccc4 into pandas-dev:master Dec 17, 2021
@jreback
Copy link
Contributor

jreback commented Dec 17, 2021

thanks @phofl

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 Error Reporting Incorrect or improved errors from pandas IO CSV read_csv, to_csv
Projects
None yet
4 participants