pandas shift columns down until value

#We create a shift down method so that we can have all the preious summed values in the bottom index and hence
#deleting them would be easy 
def shift_down(data):
    i=0
    while(i

Here is what the above code is Doing:
1. We are creating a method shift_down which takes a dataframe as an input.
2. We are creating a while loop which iterates over the columns of the dataframe.
3. We are creating another while loop which iterates over the rows of the dataframe.
4. We are checking if the last value of the column is null.
5. If the last value of the column is null, we are shifting the entire column up by one row.
6. We are returning the dataframe.