-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CoW: Avoid warnings in stata code #56392
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/io/stata.py
Outdated
@@ -467,9 +464,9 @@ def g(x: datetime) -> int: | |||
if bad_loc.any(): | |||
dates = Series(dates) |
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.
dates = Series(dates) |
And then below could use the existing dates[bad_loc]
? (if we are otherwise just setting on the _values
, there is not much point in converting to a Series?)
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.
Ah, but from seeing the surrounding code, I assume dates
is already a Series, so this wouldn't change anything (but can also be left out then, I assume)
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, we can probably remove it but we already have references, so it won't help with the warning
merging this |
xref #56019