Let's say I have the following dataframe.
one two ... ten
a 1.0 1.0 ... 1.0
b 2.0 2.0 ... NaN
c 3.0 3.0 ... NaN
d 4.0 4.0 ... 4.0
I want to iterate (maybe I don't have to?) over the dataframe, moving all rows with a Null in the far-right column one to the right, so that the NaN is instead in the first column. Specifically, I want all the values to move one over to the right, so that only the NaN in the far-right column is overwritten.
one two ... ten
a 1.0 1.0 ... 1.0
b NaN 2.0 ... 2.0
c NaN 3.0 ... 3.0
d 4.0 4.0 ... 4.0
Thank you for any and all answers, I'm pretty new to coding so I appreciate it.