I have a dataframe with two columns that I'm interested in which looks like this:
frame requests
0 0 214388438.0
1 1 194980303.0
2 2 179475934.0
3 3 165196540.0
4 4 154815540.0
5 5 123650671.0
6 6 119089045.0
This goes on for many rows. So what I'm looking for is a way to keep the value on the requests column then add rows filled with 0 and repeat the process for a certain amount of rows. frame column would also have to be updated accordingly.
Now what I need is to adjust this dataframe so that I have in the following manner:
frame requests
0 0 214388438.0
1 0 0
2 0 0
3 0 0
4 0 0
5 0 0
6 0 0
....................
47 0 0
48 1 194980303.0
49 1 0
....................
The thing is the dataframe is only 48 rows long but it could be longer like 200 or more so it would have to take that into account.