Skip to content

ENH skip 'now' and 'today' when inferring format for array #50039

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

MarcoGorelli
Copy link
Member

@MarcoGorelli MarcoGorelli commented Dec 3, 2022

breaking this off from https://github.com/pandas-dev/pandas/pull/49024/files

haven't added a whatsnew note as it's not user facing (yet! but it will make a difference after PDEP4)

@MarcoGorelli MarcoGorelli added the Datetime Datetime data dtype label Dec 3, 2022
@MarcoGorelli MarcoGorelli added this to the 2.0 milestone Dec 3, 2022
@MarcoGorelli MarcoGorelli merged commit 8da8743 into pandas-dev:main Dec 4, 2022
if (
isinstance(val, str)
and
(len(val) == 0 or val in ("now", "today", *nat_strings))
Copy link
Member

Choose a reason for hiding this comment

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

perf impact here?

Copy link
Member Author

Choose a reason for hiding this comment

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

probably negligible, especially as this only needs calling once for the whole array. I'll check tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants