Skip to content

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

Merged
merged 3 commits into from
Dec 15, 2023
Merged

CoW: Avoid warnings in stata code #56392

merged 3 commits into from
Dec 15, 2023

Conversation

phofl
Copy link
Member

@phofl phofl commented Dec 7, 2023

xref #56019

@@ -467,9 +464,9 @@ def g(x: datetime) -> int:
if bad_loc.any():
dates = Series(dates)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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?)

Copy link
Member

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)

Copy link
Member Author

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

@phofl
Copy link
Member Author

phofl commented Dec 15, 2023

merging this

@phofl phofl merged commit d77d5e5 into pandas-dev:main Dec 15, 2023
@phofl phofl deleted the fixup_stata branch December 15, 2023 22:47
cbpygit pushed a commit to cbpygit/pandas that referenced this pull request Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants