I have been working on large dataset with Lat & Longitude Data. I am doing interpolation for the whole df, so before that i just want my latitude and longitude column to have elements to filled with values without zeros.
My Dataframe (explanation purpose) :
Time lat long
0 0 0
1 0 0
2 0 0
3 0 0
4 0 0
5 0 0
6 0 0
7 5 2
8 5 2
9 0 0
10 0 0
11 0 0
12 0 0
13 6 1
14 6 1
My Requirement :
Time lat long
0 5 2
1 5 2
2 5 2
3 5 2
4 5 2
5 5 2
6 5 2
7 5 2
8 5 2
9 6 1
10 6 1
11 6 1
12 6 1
13 6 1
14 6 1
What I needed
I hope you understand from the actual df and my requirement.
I just want to take the next last element which has proper values other than zero & fill that element in previous rows of that column.
Request
I believe that there will be some nice methods to complete my work done..