-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REF: formats.format functions that should be DTA methods #55394
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/arrays/datetimes.py
Outdated
if date_format is None: | ||
ido = self._is_dates_only | ||
if ido: | ||
# Only dates and no timezone: provide a default format | ||
date_format = "%Y-%m-%d" |
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.
if date_format is None: | |
ido = self._is_dates_only | |
if ido: | |
# Only dates and no timezone: provide a default format | |
date_format = "%Y-%m-%d" | |
if date_format is None and self._is_dates_only: | |
# Only dates and no timezone: provide a default format | |
date_format = "%Y-%m-%d" |
Nit
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 idea, will update
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.
#55405 implements this same method in the mixin class TimelikeOps. That is the better long-term location. Will update whichever PR goes in second.
updated+green. this and #55405 are blockers for several in-progress branches. |
Thanks @jbrockmendel |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.