-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TYP: maybe_cast_to_datetime #39959
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
TYP: maybe_cast_to_datetime #39959
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.
question
if is_dt_string: | ||
dta = to_datetime(value, errors="raise").array | ||
if dta.tz is not None: | ||
value = dta.astype(dtype, copy=False) |
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.
test hits this?
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.
yes
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.
ATM it raises TypeError which we catch and then handle later
thanks, solid incremental improvement |
Underlying motivation is to make Block._maybe_coerce_values unnecessary, which will improve
__init__
perf