File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1313 is_scalar )
1414from pandas .core .dtypes .dtypes import CategoricalDtype
1515from 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
1717
1818from pandas .core import accessor
1919from pandas .core .algorithms import take_1d
@@ -283,7 +283,13 @@ def equals(self, other):
283283
284284 try :
285285 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 )
287293 except (TypeError , ValueError ):
288294 pass
289295
You can’t perform that action at this time.
0 commit comments