load_dataset

data.load_dataset(name, **conditions)

Open the dataset, load content into memory, and close its file handles.

Notes: This is a wrapper around open_dataset. The difference is that it loads the Dataset into memory, closes the file, and returns the Dataset. In contrast, open_dataset keeps the file handle open and lazy loads its contents.

Parameters

Name Type Description Default
name str Name of the dataset to load. required
conditions dict Additional conditions passed to where(), e.g., subject_id=['001', '002']. {}

Returns

Type Description
Dataset The newly loaded dataset.

Examples

To fully load the dataset with the name P500_9subjects/L1m:

dataset = load_dataset('P500_9subjects/L1m')

To load a dataset with the name P500_9subjects/L1m and select a subset of subjects by their IDs:

dataset = load_dataset('P500_9subjects/L1m', subject_id=['001', '002'])