Imagine you have the following df:
line amount#1 line amount#2 line amount#3 line amount#4 lacheck line amount S
0 13.72 1.92 1.92 NaN False 5
1 13.72 1.93 NaN NaN False 10
2 13.72 NaN NaN NaN False NaN
I would like to dynamically fill the first line amount that is NaN with the line amount S.
So desired output would be:
line amount#1 line amount#2 line amount#3 line amount#4 lacheck line amount S
0 13.72 1.92 1.92 5 False 5
1 13.72 1.93 10 NaN False 10
2 13.72 NaN NaN NaN False NaN
Anyone who has any idea how to do this?
Please help!