-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: Remove incorrect check, comment, rename #27922
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
Conversation
pandas/core/ops/__init__.py
Outdated
return finalizer(result).rename(res_name) | ||
result = finalizer(result) | ||
|
||
# pin name for case res_name is None and result.name is not. |
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 comment is still not correct I think. As far as I know, result.name will always be None?
As mentioned in the original PR (https://github.com/pandas-dev/pandas/pull/27803/files#r311961558), I think it is here about self.name not being None.
The problem we were trying to solve is that finalize will put back the original name, which might be wrong. So that's the reason we can't pass res_name
into _constructor
and afterwards do finalize
, as that might change the name again.
@jorisvandenbossche did i miss anything? |
Given the confusion / discussion around it, I would keep some comment explaining why you set the name after finalize (instead of passing it to |
Co-Authored-By: Joris Van den Bossche <[email protected]>
Hello @jbrockmendel! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2019-08-19 22:49:18 UTC |
updated per request |
@jorisvandenbossche gentle ping |
Thanks! |
cc @jorisvandenbossche