File tree 3 files changed +9
-1
lines changed
3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -503,3 +503,6 @@ Bug Fixes
503
503
- Bug in ``.to_csv`` ignoring formatting parameters ``decimal``, ``na_rep``, ``float_format`` for float indexes (:issue:`11553`)
504
504
505
505
- Bug in ``DataFrame`` when masking an empty ``DataFrame`` (:issue:`11859`)
506
+
507
+ - Removed ``millisecond`` property of ``DatetimeIndex``. This would always raise
508
+ a ``ValueError`` (:issue:`12019`).
Original file line number Diff line number Diff line change @@ -4028,6 +4028,12 @@ def test_fillna_period(self):
4028
4028
with tm .assertRaisesRegexp (ValueError , 'Input has different freq=D from PeriodIndex\\ (freq=H\\ )' ):
4029
4029
idx .fillna (pd .Period ('2011-01-01' , freq = 'D' ))
4030
4030
4031
+ def test_no_millisecond_field (self ):
4032
+ with self .assertRaises (AttributeError ):
4033
+ DatetimeIndex .millisecond
4034
+
4035
+ with self .assertRaises (AttributeError ):
4036
+ DatetimeIndex ([]).millisecond
4031
4037
4032
4038
class TestTimedeltaIndex (DatetimeLike , tm .TestCase ):
4033
4039
_holder = TimedeltaIndex
Original file line number Diff line number Diff line change @@ -1469,7 +1469,6 @@ def _set_freq(self, value):
1469
1469
hour = _field_accessor ('hour' , 'h' , "The hours of the datetime" )
1470
1470
minute = _field_accessor ('minute' , 'm' , "The minutes of the datetime" )
1471
1471
second = _field_accessor ('second' , 's' , "The seconds of the datetime" )
1472
- millisecond = _field_accessor ('millisecond' , 'ms' , "The milliseconds of the datetime" )
1473
1472
microsecond = _field_accessor ('microsecond' , 'us' , "The microseconds of the datetime" )
1474
1473
nanosecond = _field_accessor ('nanosecond' , 'ns' , "The nanoseconds of the datetime" )
1475
1474
weekofyear = _field_accessor ('weekofyear' , 'woy' , "The week ordinal of the year" )
You can’t perform that action at this time.
0 commit comments