Say I have two columns, A and B, in my dataframe:
A B 1 NaN 2 5 3 NaN 4 6 I want to get a new column, C, which fills in NaN cells in column B using values from column A:
A B C 1 NaN 1 2 5 5 3 NaN 3 4 6 6 How do I do this?
I'm sure this is a very basic question, but as I am new to Pandas, any help will be appreciated!