Skip to content

Commit 4e1cd48

Browse files
committed
BUG: add check so maybe_upcast_putmask is only called with ndarray
1 parent 32d79ef commit 4e1cd48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/frame.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4847,7 +4847,7 @@ def _maybe_casted_values(index, labels=None):
48474847
if issubclass(values_type, DatetimeLikeArray):
48484848
values = values._data # TODO: can we de-kludge yet?
48494849

4850-
if mask.any():
4850+
if mask.any() and isinstance(values, np.ndarray):
48514851
values, _ = maybe_upcast_putmask(values, mask, np.nan)
48524852

48534853
if issubclass(values_type, DatetimeLikeArray):

0 commit comments

Comments
 (0)