Skip to content

Commit 9d37675

Browse files
committed
Revert eadata -> data changes
1 parent 01115c4 commit 9d37675

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

pandas/core/indexes/datetimelike.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ def freq(self, value):
8787

8888
@property
8989
def freqstr(self):
90-
return self._data.freqstr
90+
return self._eadata.freqstr
9191

9292
def unique(self, level=None):
9393
if level is not None:
9494
self._validate_index_level(level)
9595

96-
result = self._data.unique()
96+
result = self._eadata.unique()
9797

9898
# Note: if `self` is already unique, then self.unique() should share
9999
# a `freq` with self. If not already unique, then self.freq must be
@@ -106,7 +106,7 @@ def _create_comparison_method(cls, op):
106106
Create a comparison method that dispatches to ``cls.values``.
107107
"""
108108
def wrapper(self, other):
109-
result = op(self._data, maybe_unwrap_index(other))
109+
result = op(self._eadata, maybe_unwrap_index(other))
110110
return result
111111

112112
wrapper.__doc__ = op.__doc__
@@ -205,7 +205,7 @@ def wrapper(left, right):
205205

206206
@Appender(DatetimeLikeArrayMixin._evaluate_compare.__doc__)
207207
def _evaluate_compare(self, other, op):
208-
result = self._data._evaluate_compare(other, op)
208+
result = self._eadata._evaluate_compare(other, op)
209209
if is_bool_dtype(result):
210210
return result
211211
try:
@@ -532,7 +532,7 @@ def _add_datetimelike_methods(cls):
532532

533533
def __add__(self, other):
534534
# dispatch to ExtensionArray implementation
535-
result = self._data.__add__(maybe_unwrap_index(other))
535+
result = self._eadata.__add__(maybe_unwrap_index(other))
536536
return wrap_arithmetic_op(self, other, result)
537537

538538
cls.__add__ = __add__
@@ -544,13 +544,13 @@ def __radd__(self, other):
544544

545545
def __sub__(self, other):
546546
# dispatch to ExtensionArray implementation
547-
result = self._data.__sub__(maybe_unwrap_index(other))
547+
result = self._eadata.__sub__(maybe_unwrap_index(other))
548548
return wrap_arithmetic_op(self, other, result)
549549

550550
cls.__sub__ = __sub__
551551

552552
def __rsub__(self, other):
553-
result = self._data.__rsub__(maybe_unwrap_index(other))
553+
result = self._eadata.__rsub__(maybe_unwrap_index(other))
554554
return wrap_arithmetic_op(self, other, result)
555555

556556
cls.__rsub__ = __rsub__
@@ -581,7 +581,7 @@ def repeat(self, repeats, axis=None):
581581
nv.validate_repeat(tuple(), dict(axis=axis))
582582
freq = self.freq if is_period_dtype(self) else None
583583
return self._shallow_copy(self.asi8.repeat(repeats), freq=freq)
584-
# TODO: dispatch to _data
584+
# TODO: dispatch to _eadata
585585

586586
@Appender(_index_shared_docs['where'] % _index_doc_kwargs)
587587
def where(self, cond, other=None):
@@ -655,10 +655,10 @@ def astype(self, dtype, copy=True):
655655
# Ensure that self.astype(self.dtype) is self
656656
return self
657657

658-
new_values = self._data.astype(dtype, copy=copy)
658+
new_values = self._eadata.astype(dtype, copy=copy)
659659

660660
# pass copy=False because any copying will be done in the
661-
# _data.astype call above
661+
# _eadata.astype call above
662662
return Index(new_values,
663663
dtype=new_values.dtype, name=self.name, copy=False)
664664

@@ -675,7 +675,7 @@ def view(self, dtype=None, type=None):
675675

676676
@Appender(DatetimeLikeArrayMixin._time_shift.__doc__)
677677
def _time_shift(self, periods, freq=None):
678-
result = self._data._time_shift(periods, freq=freq)
678+
result = self._eadata._time_shift(periods, freq=freq)
679679
return type(self)(result, name=self.name)
680680

681681
@deprecate_kwarg(old_arg_name='n', new_arg_name='periods')

pandas/core/indexes/timedeltas.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ def astype(self, dtype, copy=True):
327327
# Have to repeat the check for 'timedelta64' (not ns) dtype
328328
# so that we can return a numeric index, since pandas will return
329329
# a TimedeltaIndex when dtype='timedelta'
330-
result = self._data.astype(dtype, copy=copy)
330+
result = self._eadata.astype(dtype, copy=copy)
331331
if self.hasnans:
332332
return Index(result, name=self.name)
333333
return Index(result.astype('i8'), name=self.name)

0 commit comments

Comments
 (0)