Skip to content

Commit

Permalink
BUG: Fixed bug with setting a Series and the consistency of the colum…
Browse files Browse the repository at this point in the history
…n type. (pandas-dev#43996)
  • Loading branch information
DamianBarabonkovQC committed Oct 12, 2021
2 parents 075ec87 + 7f4e22d commit 245c3bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandas/core/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1820,10 +1820,10 @@ def _setitem_single_column(self, loc: int, value, plane_indexer):
and not is_empty_indexer(pi, value)
):
if is_list_like(pi):
ser = value[np.argsort(pi)]
ser.update(value[np.argsort(pi)])
else:
# in case of slice
ser = value[pi]
ser.update(value[pi])
else:
# set the item, possibly having a dtype change
ser = ser.copy()
Expand Down

0 comments on commit 245c3bf

Please sign in to comment.