How to replace a current year in one column with NaN values python code example Example: replace "-" for nan in dataframe df.replace(np.nan,0)