-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REF: implement ParseState #55617
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
REF: implement ParseState #55617
Conversation
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.
minor comment but generally lgtm
pandas/_libs/tslibs/strptime.pxd
Outdated
from numpy cimport int64_t | ||
|
||
|
||
cdef bint parse_today_now(str val, int64_t* iresult, bint utc) | ||
|
||
|
||
cdef class ParseState: |
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.
I think we should call this DateTimeParseState
; helps to disambiguate it in case it ends up intertwined with any other type of parser
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, updated
Thanks @jbrockmendel |
In the near future, the state being tracked in array_to_datetime and array_strptime will include a resolution (xref #55564). This implements a ParseState object to de-duplicate tracking, validation, and updating.