# for the whole dataframe df = df.fillna(axis=1, method='backfill') # only for some columns df[['A', 'B', 'C']] = df[['A', 'B', 'C']].fillna(axis=1, method='backfill')