code: def na_if(series, *values):
      
  
      series = pd.Series(series)
      series[series.isin(values)] = np.nan
      return series
docs: If values in a series match a specified value, change them to `np.nan`.
  
      Args:
          series: Series or vector, often symbolic.
          *values: Value(s) to convert to `np.nan` in the series.