Skip to content

Commit d270851

Browse files
committed
Use is_dict_like
1 parent 7403240 commit d270851

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pandas/core/frame.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -4707,9 +4707,7 @@ def _sanitize_column(self, value) -> ArrayLike:
47074707
self._ensure_valid_index(value)
47084708

47094709
# We should never get here with DataFrame value
4710-
if isinstance(value, Series):
4711-
return _reindex_for_setitem(value, self.index)
4712-
elif isinstance(value, dict):
4710+
if is_dict_like(value):
47134711
return _reindex_for_setitem(Series(value), self.index)
47144712

47154713
if is_list_like(value):

0 commit comments

Comments
 (0)