17
17
PeriodIndex , Timedelta , IntervalIndex , Interval ,
18
18
CategoricalIndex , Timestamp , DataFrame , Panel )
19
19
from pandas .core .arrays import (
20
+ PandasArray ,
20
21
DatetimeArrayMixin as DatetimeArray ,
21
22
TimedeltaArrayMixin as TimedeltaArray ,
22
23
)
23
24
from pandas .compat import StringIO , PYPY , long
24
25
from pandas .compat .numpy import np_array_datetime64_compat
25
- from pandas .core .arrays import PandasArray
26
26
from pandas .core .accessor import PandasDelegate
27
27
from pandas .core .base import PandasObject , NoNewAttributesMixin
28
28
from pandas .core .indexes .datetimelike import DatetimeIndexOpsMixin
@@ -388,11 +388,9 @@ def test_value_counts_unique_nunique(self):
388
388
for r in result :
389
389
assert isinstance (r , Timestamp )
390
390
391
- # TODO(#24024) once orig._values returns DTA, remove
392
- # the `._eadata` below
393
391
tm .assert_numpy_array_equal (
394
392
result .astype (object ),
395
- orig ._values ._eadata . astype (object ))
393
+ orig ._values .astype (object ))
396
394
else :
397
395
tm .assert_numpy_array_equal (result , orig .values )
398
396
@@ -418,9 +416,7 @@ def test_value_counts_unique_nunique_null(self):
418
416
else :
419
417
o = o .copy ()
420
418
o [0 :2 ] = iNaT
421
- # TODO(#24024) once Series._values returns DTA, remove
422
- # the `._eadata` here
423
- values = o ._values ._eadata
419
+ values = o ._values
424
420
425
421
elif needs_i8_conversion (o ):
426
422
values [0 :2 ] = iNaT
@@ -1158,7 +1154,7 @@ def test_iter_box(self):
1158
1154
(np .array (['a' , 'b' ]), np .ndarray , 'object' ),
1159
1155
(pd .Categorical (['a' , 'b' ]), pd .Categorical , 'category' ),
1160
1156
(pd .DatetimeIndex (['2017' , '2018' ]), np .ndarray , 'datetime64[ns]' ),
1161
- (pd .DatetimeIndex (['2017' , '2018' ], tz = "US/Central" ), pd . DatetimeIndex ,
1157
+ (pd .DatetimeIndex (['2017' , '2018' ], tz = "US/Central" ), DatetimeArray ,
1162
1158
'datetime64[ns, US/Central]' ),
1163
1159
(pd .TimedeltaIndex ([10 ** 10 ]), np .ndarray , 'm8[ns]' ),
1164
1160
(pd .PeriodIndex ([2018 , 2019 ], freq = 'A' ), pd .core .arrays .PeriodArray ,
0 commit comments