-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG:error in reading a boolean column with blanks from excel file #45903 #46374
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
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
532a846
BUG:error in reading a boolean column with blanks
dimitra-karadima 4d2a6f5
TST: add xlsb file because of failing test
dimitra-karadima cf32733
Update doc/source/whatsnew/v1.5.0.rst
dimitra-karadima 9d55372
Merge branch 'main' into fix-45903
dimitra-karadima 5af0af4
TST: update unit tests for bool with blank
dimitra-karadima 00d2195
Merge branch 'fix-45903' of https://github.com/dimitra-karadima/panda…
dimitra-karadima File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -420,8 +420,10 @@ def test_reader_special_dtypes(self, request, read_ext): | |
datetime(2013, 12, 14), | ||
datetime(2015, 3, 14), | ||
], | ||
"BoolColWithBlank": [True, False, None, True, False], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @datapythonista I upated the test_types files as you suggested but for some reason no False or True values are shown. Only 1 or 0 and I cannot find out why. |
||
}, | ||
) | ||
|
||
basename = "test_types" | ||
|
||
# should read in correctly and infer types | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 fail to understand how this is related to having blanks. In the current version of pandas (without the changes in this PR), what's the value of the blank value in the spreadsheet when constructing the extension array? Feels like it should be
None
or an empty string, not one of those.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.
@datapythonista Hello! Thanks for the review! The point here is that I added this list because the isna() fails. The None values are converted into strings so without this list, the "None" values will raise a ValueError. Of course if you have any suggestion on how to implement this better please tell me.