Skip to content

BUG: repr on DTI with high precision is wrong #19030

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 Jan 1, 2018 · 0 comments · Fixed by #19109
Closed

BUG: repr on DTI with high precision is wrong #19030

jreback opened this issue Jan 1, 2018 · 0 comments · Fixed by #19109
Labels
Datetime Datetime data dtype Output-Formatting __repr__ of pandas objects, to_string
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Jan 1, 2018

SO the value is correct

In [2]: pd.DatetimeIndex(['2017-01-01 23:59:59.999999999'])
Out[2]: DatetimeIndex(['2017-01-01'], dtype='datetime64[ns]', freq=None)

In [3]: pd.DatetimeIndex(['2017-01-01 23:59:59.999999999']).values
Out[3]: array(['2017-01-01T23:59:59.999999999'], dtype='datetime64[ns]')

and lower precision is ok

In [4]: pd.DatetimeIndex(['2017-01-01 23:59:59.999999'])
Out[4]: DatetimeIndex(['2017-01-01 23:59:59.999999'], dtype='datetime64[ns]', freq=None)

but the ns is causing issues.

@jreback jreback added Difficulty Intermediate Output-Formatting __repr__ of pandas objects, to_string Datetime Datetime data dtype labels Jan 1, 2018
@jreback jreback added this to the Next Major Release milestone Jan 1, 2018
@jreback jreback modified the milestones: Next Major Release, 0.23.0 Jan 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant