nwm_region_mgr.utils.io_utils.read_table#

nwm_region_mgr.utils.io_utils.read_table(file_path, dtype=None, refresh=False)[source]#

Read a table from CSV, TSV, or Parquet with caching and optional automatic refresh.

Return type:

DataFrame

Parameters:
  • file_path (Path | str) – Path to the file to read. Supported formats are CSV, TSV, and Parquet.

  • dtype (dict | None) – Optional dictionary specifying the data types for specific columns.

  • refresh (bool) – If True, forces re-reading the file even if it is cached. Default is False.

Returns:

DataFrame containing the data from the file.

Return type:

pd.DataFrame