I am trying but not able to remove nan while combining two columns of a DataFrame.
nan
DataFrame
Data is like:
feedback_id
If you want a solution that doesn't require referencing df twice or any of its columns explicitly:
df
df.bfill(axis=1).iloc[:, 0]
With two columns, this will copy non-null values from the right column into the left, then select the left column.