Skip to content

Commit 417df28

Browse files
REGR: revert ExtensionBlock.set to be in-place
1 parent 591da6b commit 417df28

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pandas/core/internals/blocks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1589,7 +1589,7 @@ def should_store(self, value: ArrayLike) -> bool:
15891589

15901590
def set(self, locs, values):
15911591
assert locs.tolist() == [0]
1592-
self.values[:] = values
1592+
self.values = values
15931593

15941594
def putmask(
15951595
self, mask, new, inplace: bool = False, axis: int = 0, transpose: bool = False,

pandas/tests/indexing/test_iloc.py

+1
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,7 @@ def test_series_indexing_zerodim_np_array(self):
694694
result = s.iloc[np.array(0)]
695695
assert result == 1
696696

697+
@pytest.mark.xfail(reason="https://github.com/pandas-dev/pandas/issues/33457")
697698
def test_iloc_setitem_categorical_updates_inplace(self):
698699
# Mixed dtype ensures we go through take_split_path in setitem_with_indexer
699700
cat = pd.Categorical(["A", "B", "C"])

0 commit comments

Comments
 (0)