Skip to content

BUG: read_csv with mixed bools and int sometimes reads 1 as a bool function. #43179

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 2 commits into from

Conversation

shubham11941140
Copy link
Contributor

@shubham11941140 shubham11941140 commented Aug 23, 2021

The major issue is that the parser is reading 1 as a boolean expression and not as an integer.

So, making 2 different tests based on the data type of the input or return of a function can help split the parsing as two seperate entities.

Reference: #42944

@pep8speaks
Copy link

pep8speaks commented Aug 23, 2021

Hello @shubham11941140! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 594:1: E302 expected 2 blank lines, found 1
Line 597:41: E251 unexpected spaces around keyword / parameter equals
Line 597:43: E251 unexpected spaces around keyword / parameter equals
Line 598:56: E251 unexpected spaces around keyword / parameter equals
Line 598:58: E251 unexpected spaces around keyword / parameter equals
Line 600:1: E302 expected 2 blank lines, found 1
Line 603:55: E251 unexpected spaces around keyword / parameter equals
Line 603:57: E251 unexpected spaces around keyword / parameter equals
Line 607:1: E302 expected 2 blank lines, found 1
Line 610:41: E251 unexpected spaces around keyword / parameter equals
Line 610:43: E251 unexpected spaces around keyword / parameter equals
Line 611:50: E251 unexpected spaces around keyword / parameter equals
Line 611:52: E251 unexpected spaces around keyword / parameter equals

Comment last updated at 2021-08-23 13:40:10 UTC

@shubham11941140
Copy link
Contributor Author

It mentions workflow requires approval, please do the same. I have also got few PEP 8 issues. Do I need to solve them?
The code is compiling correctly.

@mzeitlin11
Copy link
Member

These changes look identical to #42944 with some changes like flipping if statements, test order, and removing comments?

@shubham11941140
Copy link
Contributor Author

Ok I will write using reference.

@mzeitlin11
Copy link
Member

Ok I will write using reference.

First, if you build off another PR, you should always reference it (otherwise looks like plagiarism). Also that PR is fine, so there is no reason for another one doing the same thing

@shubham11941140
Copy link
Contributor Author

Could you suggest me how do I study with the codebase and then solve bugs?
Actually the issue is that I know how to solve bugs but I have no idea which files to modify and where to?

@shubham11941140
Copy link
Contributor Author

The repo is huge due to which I am unable to find and pinpoint issues.

@mzeitlin11
Copy link
Member

Closing this to not waste CI resources. Please do not copy code without credit in future.

@mzeitlin11 mzeitlin11 closed this Aug 23, 2021
@mzeitlin11
Copy link
Member

Could you suggest me how do I study with the codebase and then solve bugs?
Actually the issue is that I know how to solve bugs but I have no idea which files to modify and where to?

https://pandas.pydata.org/docs/development/contributing.html will be helpful. Learning to use a debugger is the best way to learn how to solve bugs (since finding where to fix issues is the hardest part of solving them)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: read_csv converts NaN to 1.0 in certain circumstances
3 participants