-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: read_csv not converting to float for python engine with decimal sep, usecols and parse_dates #38334
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
BUG: read_csv not converting to float for python engine with decimal sep, usecols and parse_dates #38334
Changes from 15 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
8c2e1ca
BUG: read_csv not converting to float for python engine with decimal …
phofl c1b9a7b
Move sorted
phofl 76b91bf
Fix mypy issues
phofl 9de5059
Run black
phofl ca76832
Merge branch 'master' of https://github.com/pandas-dev/pandas into 35873
phofl 85a3d22
Move whatsnew
phofl 2958d2a
Remove comment
phofl 1d740e0
Merge branch 'master' of https://github.com/pandas-dev/pandas into 35873
phofl 88bf395
Remove from 1.2
phofl 6ad5385
Merge branch 'master' into 35873
phofl da4b602
Merge branch 'master' into 35873
phofl 384c114
Move test
phofl 070f67d
Merge branch '35873' of https://github.com/phofl/pandas into 35873
phofl 70780da
Remove import
phofl 9d6205a
Merge branch 'master' of https://github.com/pandas-dev/pandas into 35873
phofl 4afa2c8
Always define self._col_indices
phofl 5bee24a
Move comments
phofl d96a256
Merge branch 'master' of https://github.com/pandas-dev/pandas into 35873
phofl c6a226b
Add init files
phofl 3ece01b
Fix line numbers
phofl 6cca960
Remove mypy ignores
phofl 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
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.
Why can't we always define this way on L2310 or L2297?
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.
We do not have acces to self.columns in L2297. Sometimes we set this in
_infer_columns
in L2302, so we have to check if it was already set to not override. Could move it up a bit but would have to check if it exists neverthelessThere 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.
can you instead define _col_list = None then as the default
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.
This would work of course, but we would get the mypy problems in again. Could do that nevertheless if this is preferable
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.
yes i think its important that this is always defined. you can use
Optional[List[int]]
, then you assert its not NoneThere 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.
Optional[List[int]] unfortunately raises the mypy error too. assert is not None does not help, so added the ignores back in