Skip to content

hssm.load_data

hssm.load_data

load_data(dataset: Optional[str] = None) -> pd.DataFrame | str

Load a dataset as a pandas DataFrame.

If a valid dataset name is provided, this function will return the corresponding DataFrame. Otherwise, it lists the available datasets.

Parameters:

  • dataset (str, default: None ) –

    Name of the dataset to load. If not provided, a list of available datasets is returned.

Raises:

  • ValueError

    If the provided dataset name does not match any of the available datasets.

Returns:

  • DataFrame or str

    Loaded dataset as a DataFrame if a valid dataset name was provided, otherwise a string listing the available datasets.