Skip to content

Commit 64a591a

Browse files
committed
whatsnew, GH ref
1 parent d1f0bba commit 64a591a

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

doc/source/whatsnew/v1.5.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ Indexing
212212
- Bug in :meth:`DataFrame.iloc` where indexing a single row on a :class:`DataFrame` with a single ExtensionDtype column gave a copy instead of a view on the underlying data (:issue:`45241`)
213213
- Bug in :meth:`Series.__setitem__` with a non-integer :class:`Index` when using an integer key to set a value that cannot be set inplace where a ``ValueError`` was raised insead of casting to a common dtype (:issue:`45070`)
214214
- Bug when setting a value too large for a :class:`Series` dtype failing to coerce to a common type (:issue:`26049`, :issue:`32878`)
215+
- Bug in :meth:`loc.__setitem__` treating ``range`` keys as positional instead of label-based (:issue:`45479`)
215216
-
216217

217218
Missing

pandas/core/indexing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ def _get_setitem_indexer(self, key):
665665
return self._convert_tuple(key)
666666

667667
if isinstance(key, range):
668-
# test_loc_setitem_range_key
668+
# GH#45479 test_loc_setitem_range_key
669669
key = list(key)
670670

671671
return self._convert_to_indexer(key, axis=0)

pandas/tests/indexing/test_loc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,7 @@ def test_loc_setitem_cast3(self):
15561556
assert df.dtypes.one == np.dtype(np.int8)
15571557

15581558
def test_loc_setitem_range_key(self, frame_or_series):
1559-
# don't treat range key as positional
1559+
# GH#45479 don't treat range key as positional
15601560
obj = frame_or_series(range(5), index=[3, 4, 1, 0, 2])
15611561

15621562
values = [9, 10, 11]

0 commit comments

Comments
 (0)