Suppose I have the following dataframe:
pd.DataFrame({\'col1\': [\"a\", \"a\", np.nan, np.nan, np.nan], \'override1\': [\"b\", np.nan, \"b\",
using ffill
ffill
df.ffill(1).iloc[:,-1]