Skip to content

Commit 988354d

Browse files
committed
add missing import
1 parent 248fff2 commit 988354d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas/core/dtypes/cast.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -488,12 +488,16 @@ def maybe_casted_values(index, codes=None):
488488
values_type = type(values)
489489
values_dtype = values.dtype
490490

491-
if needs_i8_conversion(values.dtype) and isinstance(values, ExtensionArray):
491+
from pandas.core.arrays.datetimelike import DatetimeLikeArrayMixin
492+
493+
if isinstance(values, DatetimeLikeArrayMixin):
492494
values = values._data # TODO: can we de-kludge yet?
493495

494496
if mask.any():
495497
values, _ = maybe_upcast_putmask(values, mask, np.nan)
496498

499+
from pandas.core.arrays import ExtensionArray
500+
497501
if needs_i8_conversion(values.dtype) and isinstance(values, ExtensionArray):
498502
values = values_type(values, dtype=values_dtype)
499503

0 commit comments

Comments
 (0)