PERF: vectorized DateOffset with months by chris-b1 · Pull Request #11205 · pandas-dev/pandas (original) (raw)

In [57]: df.index._constructor(df.index) Out[57]: Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], dtype='int64')

In [58]: df.index._shallow_copy(df.index) Out[58]: Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], dtype='int64', name='hi')