I have a df that looks something like the below
Index Col1 Col2 Col3 Col4 Col5
0 12 121 346 abc 747
1 156 121 146 68 75967
2 234 121 346 567
3 gj 161 646
4 214 171
5 fhg
.... .....
And I want to make the dataframe appear such that the columns where there are null values, the columns move/shift their data to the bottom of the dataframe. Eg it should look like:
Index Col1 Col2 Col3 Col4 Col5
0 12
1 156 121
2 234 121 346
3 gj 121 146 abc
4 214 161 346 68 747
5 fhg 171 646 567 75967
I have thought along the lines of shift and/or justify. However not sure how it can be accomplished in the most efficient way for a large dataframe