Skip to content

BUG: insert NaT into tz-aware DTI. #16357

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

Closed
jreback opened this issue May 15, 2017 · 1 comment · Fixed by #18883
Closed

BUG: insert NaT into tz-aware DTI. #16357

jreback opened this issue May 15, 2017 · 1 comment · Fixed by #18883
Labels
Bug Datetime Datetime data dtype Reshaping Concat, Merge/Join, Stack/Unstack, Explode Timezones Timezone data dtype
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented May 15, 2017

this should work (also should test for other index reshaping ops) & for TDI and PI

In [7]: pd.DatetimeIndex(['2017-01-01']).insert(0, pd.NaT)
Out[7]: DatetimeIndex(['NaT', '2017-01-01'], dtype='datetime64[ns]', freq=None)

In [8]: pd.DatetimeIndex(['2017-01-01'], tz='UTC').insert(0, pd.NaT)
ValueError: Passed item and index have different timezone
@jreback jreback added Bug Difficulty Intermediate Reshaping Concat, Merge/Join, Stack/Unstack, Explode Datetime Datetime data dtype Timezones Timezone data dtype labels May 15, 2017
@jreback jreback added this to the Next Major Release milestone May 15, 2017
@theodoreschen
Copy link

Taking a look at this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Datetime Datetime data dtype Reshaping Concat, Merge/Join, Stack/Unstack, Explode Timezones Timezone data dtype
Projects
None yet
2 participants