replace the existing values to NAN in a given file code example Example: replace "-" for nan in dataframe df.replace(np.nan,0)