Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
RangeIndex.append() should return RangeIndex when possible #16212
Code Sample, a copy-pastable example if possible
In : i1, i2 = pd.RangeIndex(2), pd.RangeIndex(2, 4) In : i1.union(i2) Out: RangeIndex(start=0, stop=4, step=1) In : i1.append(i2) Out: Int64Index([0, 1, 2, 3], dtype='int64')
It would be nice if appending consecutive
This was briefly discussed here.
PR on its way.