genome_spy.datasets.load_dataset¶
- genome_spy.datasets.load_dataset(name, *, as_format='auto')View on GitHub¶
Load a packaged example dataset by name.
- Description:
The loader understands the small set of real datasets vendored with the package for examples and tutorials.
"auto"returns a pandasDataFramefor CSV, TSV, and compressed MAF files and parsed Python objects for JSON files.
- Parameters:
name – Dataset name from
available_datasets().as_format – Output format to return.
- Returns:
The loaded dataset in the requested format.
- Raises:
DatasetNotFoundError – If the dataset name is unknown.
ImportError – If
as_format="dataframe"is requested without pandas.ValueError – If the requested format does not match the stored file type.
Example
>>> load_dataset("hapmap_gwas").head() >>> load_dataset("pik3ca_mutations", as_format="json")["domains"][0]