My df looks like below
id number
123 1
256 2
879 3
132 4
3215 5
216 6
Output should be like this:
id number
123 1
256 2
879 3
132 4
3215 5
216 6
NaN 7
NaN 8
NaN 9
NaN 10
So basically I need add 1 into previous row in column number and in column id there shouldn't be any values. I need 30 new rows. I tried with this:
n = 30
for i in range(n):
df = df.append(df.tail(1).add(1))
but result was not correct. Do youhave any ideas? Thanks for help. Regards Tomasz