Hi I have a df like this,
Name sl no details score
0 Ram 1 ram is going to ooty NaN
1 Ram 2 ram sings well 1.5
2 Ravi 1 ravi play cricket 1.0
3 Ravi 2 ravi is in chennai NaN
4 Kumar 1 kumar passed the exam NaN
5 Kumar 2 kumar is in town NaN
6 Kumar 3 he left 3.0
I am trying to shift the values in the score column. values should moved to the cell where df[sl no]==1 or df[Name] is the first occurence of a name
My expected output should be like,
Name sl no details score
0 Ram 1 ram is going to ooty 1.5
1 Ram 2 ram sings well NaN
2 Ravi 1 ravi play cricket 1.0
3 Ravi 2 ravi is in chennai NaN
4 Kumar 1 kumar passed the exam 3.0
5 Kumar 2 kumar is in town NaN
6 Kumar 3 he left NaN
Please help.