We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7403240 commit d270851Copy full SHA for d270851
pandas/core/frame.py
@@ -4707,9 +4707,7 @@ def _sanitize_column(self, value) -> ArrayLike:
4707
self._ensure_valid_index(value)
4708
4709
# 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):
+ if is_dict_like(value):
4713
return _reindex_for_setitem(Series(value), self.index)
4714
4715
if is_list_like(value):
0 commit comments