-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: remove _try_coerce_result altogether #27683
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
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c5f3a36
de-kludge quantile, make interpolate_with_fill understand datetime64
jbrockmendel 519ef0d
remove no-lomnger-necessary
jbrockmendel 0b00695
blackify
jbrockmendel d531e96
remove _try_coerce_result
jbrockmendel 4318ff6
remove unnecessary
jbrockmendel 6620848
Merge branch 'master' of https://github.com/pandas-dev/pandas into co…
jbrockmendel fd3bd91
Merge branch 'master' of https://github.com/pandas-dev/pandas into co…
jbrockmendel 2504066
revert
jbrockmendel 620dc5d
Merge branch 'master' of https://github.com/pandas-dev/pandas into co…
jbrockmendel e42ade9
Merge branch 'master' of https://github.com/pandas-dev/pandas into co…
jbrockmendel 0088127
Merge branch 'master' of https://github.com/pandas-dev/pandas into co…
jbrockmendel d1eab54
do casting in two places instead of one
jbrockmendel 9e5b801
Merge branch 'master' of https://github.com/pandas-dev/pandas into co…
jbrockmendel 7824293
Merge branch 'master' of https://github.com/pandas-dev/pandas into co…
jbrockmendel e053097
requested rearrangement
jbrockmendel 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.
you shouldn't do this here and rather handle at a higher level as datetime64 is caught below for some operations.
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.
later in this function it checks for datetime64 to exclude add/prod/cumsum/cumprod, but there is nowhere else in this module where we handle datetime64tz AFAICT
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.
my point is that this is not the right place to handle this. if you want to transform the input then let it pass thru or raise a NotImplementedError then that is fine, but the way you are writing it is is very diffferent.
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.
all
aggregate
andtransform
calls go through here, so this is the only place AFAICT that we can do this without having to duplicate it for every calling function. If there is a better place, can you be more specific?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.
missing my point. I have no problem handling this in this function. What you wrote returns early, bypassing all of the logic that handles all of the other dtypes. So it needs to be integrated there OR handled at a higher level on a NotImplementedError raise.
This function becomes even harder to understand with this addition. In theory you could also split this function up more logically. There are a number of solutions.
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.
edited to do what I think you're suggesting.
the method could use a good refactor, agreed. separate pass.