nwm_eval.pair_data.replace_values_with_nan#

nwm_eval.pair_data.replace_values_with_nan(df, colnames, replace_values, tol=1e-12)[source]#

Replace specified values in DataFrame with NaN.

Parameters:
  • df (pd.DataFrame) – Input DataFrame.

  • colnames (list of str or str) – List of column names to check for replacement.

  • replace_values (list of float) – List of values to be replaced with NaN.

  • tol (float, optional) – Tolerance for comparing floating-point values (default is 1e-12).

Returns:

DataFrame with specified values replaced by NaN.

Return type:

pd.DataFrame