-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: avoid getattr(obj, "values", obj) #33776
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
LGTM as well. Clearer call IMO |
pandas/core/arrays/interval.py
Outdated
@@ -648,7 +648,7 @@ def fillna(self, value=None, method=None, limit=None): | |||
) | |||
raise TypeError(msg) | |||
|
|||
value = getattr(value, "_values", value) | |||
value = extract_array(value, extract_numpy=True) |
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.
There is a if not isinstance(value, Interval)
just above, meaning that value
should be an Interval, and this line can just be removed altogether?
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.
good catch, will update
xref #27167
@mroeschke can you pls double-check me on the change in window.rolling