Skip to content

Conversation

@jbrockmendel
Copy link
Member

Underlying motivation is to make Block._maybe_coerce_values unnecessary, which will improve __init__ perf

@jreback jreback added the Typing type annotations, mypy/pyright type checking label Feb 22, 2021
Copy link
Contributor

@jreback jreback left a 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)
Copy link
Contributor

Choose a reason for hiding this comment

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

test hits this?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

Copy link
Member Author

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

@jreback jreback added this to the 1.3 milestone Feb 24, 2021
@jreback jreback merged commit f98e17e into pandas-dev:master Feb 24, 2021
@jreback
Copy link
Contributor

jreback commented Feb 24, 2021

thanks, solid incremental improvement

@jbrockmendel jbrockmendel deleted the typ-maybe_case_to_datetime branch February 24, 2021 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Typing type annotations, mypy/pyright type checking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants