File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 13
13
is_scalar )
14
14
from pandas .core .dtypes .dtypes import CategoricalDtype
15
15
from pandas .core .dtypes .generic import ABCCategorical , ABCSeries
16
- from pandas .core .dtypes .missing import array_equivalent , isna
16
+ from pandas .core .dtypes .missing import isna
17
17
18
18
from pandas .core import accessor
19
19
from pandas .core .algorithms import take_1d
@@ -283,7 +283,13 @@ def equals(self, other):
283
283
284
284
try :
285
285
other = self ._is_dtype_compat (other )
286
- return array_equivalent (self ._data , other )
286
+ # changed from array_equivalent to avoid a ValueError
287
+ # from trying to convert NaT.
288
+ # This should also be faster, since we don't coerce to
289
+ # arryays
290
+ if isinstance (other , type (self )):
291
+ other = other ._data
292
+ return self ._data .equals (other )
287
293
except (TypeError , ValueError ):
288
294
pass
289
295
You can’t perform that action at this time.
0 commit comments