nwm_eval.create_plots.group_df_by_location#
- nwm_eval.create_plots.group_df_by_location(df, location_list, location_col)[source]#
Group DataFrame by location and return a tuple of DataFrames (in_list, out_list).
- Return type:
tuple- Parameters:
df – A DataFrame or GeoDataFrame containing the data to be grouped.
location_list – A list of location identifiers to be used for grouping.
location_col – The name of the column in the DataFrame that contains the location identifiers.
- Returns:
(df_inlist, df_outlist), where df_inlist contains rows with location identifiers in the location_list, and df_outlist contains rows with location identifiers not in the location_list.
- Return type:
A tuple of two DataFrames