Given the following dataframe:
df = pd.DataFrame({\'foo\': [1, np.nan, 1, 1]})
When having to deal with nan values, I\'m used to handle them with