hydromt.data_catalog.DataCatalog.get_dataframe#

DataCatalog.get_dataframe(data_like: str | SourceSpecDict | Path | Dataset | DataArray, variables: list | None = None, time_tuple: Tuple | None = None, handle_nodata: NoDataStrategy = NoDataStrategy.RAISE, provider: str | None = None, version: str | None = None, **kwargs)[source]#

Return a unified and sliced DataFrame.

Parameters:
  • data_like (str, Path, pd.DataFrame) – Data catalog key, path to tabular data file or tabular pandas dataframe. The catalog key can be a string or a dictionary with the following keys: {‘name’, ‘provider’, ‘version’}. If a path to a tabular data file is provided it will be added to the catalog with its based on the file basename.

  • variables (str or list of str, optional.) – Names of GeoDataset variables to return. By default all dataset variables are returned.

  • time_tuple (tuple of str, datetime, optional) – Start and end date of period of interest. By default the entire time period of the dataset is returned.

  • handle_nodata (NoDataStrategy Optional) – what should happen if the requested data set is empty. RAISE by default

  • **kwargs – Additional keyword arguments that are passed to the DataframeAdapter function. Only used if data_like is a path to a tabular data file.

Returns:

Tabular data. If no data is found and handle_nodata is set to IGNORE None will be returned. if it is set to RAISE and exception will be raised in that situation

Return type:

pd.DataFrame