replace "-" for nan in dataframe code example Example: replace "-" for nan in dataframe df.replace(np.nan,0)