Skip to content

CLN Simplify tz / utc arguments #49863

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 1 commit into from
Nov 23, 2022

Conversation

MarcoGorelli
Copy link
Member

@MarcoGorelli MarcoGorelli commented Nov 23, 2022

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

Noticed while looking into #49298

There's quite a few places where tz can only be 'utc' or None, which is confusing. Might as well just use the boolean utc

@MarcoGorelli MarcoGorelli changed the title Simplify tz / utc arguments CLN Simplify tz / utc arguments Nov 23, 2022
@MarcoGorelli MarcoGorelli marked this pull request as ready for review November 23, 2022 11:47
@MarcoGorelli MarcoGorelli added Datetime Datetime data dtype Clean labels Nov 23, 2022
tz : object
None or 'utc'
utc : bool
Whether to convert/localize timestamps to UTC.
Copy link
Member Author

Choose a reason for hiding this comment

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

here the argument was already utc, but the docstring was outdated

Copy link
Member

@jbrockmendel jbrockmendel left a comment

Choose a reason for hiding this comment

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

LGTM

@jbrockmendel jbrockmendel merged commit 0d8f11b into pandas-dev:main Nov 23, 2022
@jbrockmendel
Copy link
Member

thanks @MarcoGorelli

mliu08 pushed a commit to mliu08/pandas that referenced this pull request Nov 27, 2022
Simplify tz / utc arguments

Co-authored-by: MarcoGorelli <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Datetime Datetime data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants