dataframe if nan replace code example
Example 1: replace "-" for nan in dataframe
df.replace(np.nan,0)
Example 2: python pandas replace nan with null
df.fillna('', inplace=True)
df.replace(np.nan,0)
df.fillna('', inplace=True)