nwm_eval.utils.clean_data#

nwm_eval.utils.clean_data(df, column)[source]#

Clean the data by replacing inf values with NaN and dropping rows with NaN in the specified column.

Return type:

DataFrame | GeoDataFrame

Parameters:
  • df (pd.DataFrame | gpd.GeoDataFrame) – The input DataFrame or GeoDataFrame to clean.

  • column (str) – The name of the column to check for inf values and NaNs.

Returns:

The cleaned DataFrame or GeoDataFrame.

Return type:

pd.DataFrame | gpd.GeoDataFrame