-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: True cannot be cast to bool in read_excel #58994
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
mroeschke
merged 17 commits into
pandas-dev:main
from
rmhowe425:dev/bug/cast-to-boolean
Jun 25, 2024
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
1fcbde6
Adding implementation, tests. Updating documentation
rmhowe425 f77c41d
Fixing dependency error by moving test inside of TestReaders
rmhowe425 ffb65d4
Updating implementation based on reviewer feedback
rmhowe425 14e565e
Creating a more clean implementation
rmhowe425 873bc9b
Fixing broken unit tests
rmhowe425 e918066
Fixing docstring error
rmhowe425 7de150e
Updating implementation based on reviewer feedback. Adding additional…
rmhowe425 e9fe60c
Merge branch 'pandas-dev:main' into dev/bug/cast-to-boolean
rmhowe425 2a2e8a3
Updating implementation based on reviewer feedback
rmhowe425 561b6ff
Merge branch 'dev/bug/cast-to-boolean' of github.com:rmhowe425/pandas…
rmhowe425 614c880
Updating implementation based on reviewer feedback
rmhowe425 c62571e
Using datapath fixture
rmhowe425 d871d79
Fixing failing unit test
rmhowe425 306ea32
Removing unneeded file
rmhowe425 d11f77b
Merge branch 'main' into dev/bug/cast-to-boolean
rmhowe425 66d34f0
Fixing failing documentation test
rmhowe425 42285ff
Updating unit test based on reviewer feedback
rmhowe425 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.
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
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.
none_values
is not passed anything here. Can the equivalentna_values
andkeep_default_na
be passed in here, or is it irrelevant?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 think I see what you're saying. You're suggesting to propagate
na_values
andkeep_default_na
from read_excel() to _cast_types()?I think that's a good idea. I'll make that change. That should allow me to get rid of
_NONE_VALUES
in boolean.py, and allow me to dynamically handle any values that equate to None.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.
Those params are already available in _cast_types since it's an instance method (so self.na_values and self.keep_default_na are available here, similar to self.true_values and self.false_values). I was thinking about progagating them to
_from_sequence_of_strings()
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.
Yep we're on the same page. Making those changes now