I created dataframe to test fillna() method for NaN values.
col1 = [np.nan,1,2,3] col2 = [2,3,4,np.nan] df = pd.DataFrame({\'col1\': col1, \'col2\': col2})