REGR: setitem with integer slices on Int/RangeIndex is broken (label instead of positional) · Issue #31469 · pandas-dev/pandas (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@amueller

Description

@amueller

There's an backward incompatible change in pandas 1.0 that I didn't find in the changelog. I might have just overlooked it though.

import numpy as np X = pd.DataFrame(np.zeros((100, 1))) X[-4:] = 1 X

In pandas 0.25.3 or lower, this results in the last four entries of X to be 1 and all the others zero. In pandas 1.0, it results in all entries of X being 1.
I assume it's a change of indexing axis 0 or axis 1?