Skip to content

Conversation

@reidy-p
Copy link
Contributor

@reidy-p reidy-p commented Jan 6, 2018

On master:

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

On my branch:

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

It seems that it's only a problem when the time value was 23:59:59.999999999 or very similar, but I may need to add some more tests to check this further.

'[10 rows x 2 columns]')
assert repr(df) == expected

def test_datetimeindex_highprecision(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

see if you can parametrize this checking each digit of precision

- Bug in :class:`Series` with ``dtype='timedelta64[ns]`` where addition or subtraction of ``TimedeltaIndex`` could return a ``Series`` with an incorrect name (issue:`19043`)
- Fixed bug where comparing :class:`DatetimeIndex` failed to raise ``TypeError`` when attempting to compare timezone-aware and timezone-naive datetimelike objects (:issue:`18162`)
-
- Bug in :class:`DatetimeIndex` where the repr was not showing the time values for the end of the day (:issue:`19030`)
Copy link
Contributor

Choose a reason for hiding this comment

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

make this more clear

@jreback jreback added Output-Formatting __repr__ of pandas objects, to_string Datetime Datetime data dtype labels Jan 6, 2018
@codecov
Copy link

codecov bot commented Jan 7, 2018

Codecov Report

Merging #19109 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@ ## master #19109 +/- ## ========================================== + Coverage 91.51% 91.53% +0.02%  ========================================== Files 148 148 Lines 48753 48753 ========================================== + Hits 44616 44628 +12  + Misses 4137 4125 -12
Flag Coverage Δ
#multiple 89.91% <ø> (+0.02%) ⬆️
#single 41.6% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/io/formats/format.py 96.24% <ø> (ø) ⬆️
pandas/plotting/_converter.py 66.95% <0%> (+1.73%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36a71eb...aaa1f0c. Read the comment docs.

@reidy-p reidy-p force-pushed the datetimeindex_repr branch from 338c441 to 055e0ac Compare January 7, 2018 12:25
@pep8speaks
Copy link

pep8speaks commented Jan 7, 2018

Hello @reidy-p! Thanks for updating the PR.

Cheers ! There are no PEP8 issues in this Pull Request. 🍻

Comment last updated on January 07, 2018 at 12:38 Hours UTC
@jreback jreback added this to the 0.23.0 milestone Jan 7, 2018
@jreback jreback merged commit fe66b56 into pandas-dev:master Jan 7, 2018
@jreback
Copy link
Contributor

jreback commented Jan 7, 2018

thanks @reidy-p

@reidy-p reidy-p deleted the datetimeindex_repr branch January 7, 2018 15:44
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

3 participants