I have a dataframe like this:
df = pd.DataFrame({0: list('wxyz'), 1: [1,2,None,None], 2: [10,20,30,None]}).T
print(df)
0 1 2 3
0 w x y z
1 1 2 NaN NaN
2 10 20 30 NaN
How to put all the NAs in the left instead of right?
Required:
0 1 2 3
0 w x y z
1 NaN NaN 1 2
2 NaN 10 20 30