pymovements.datasets.dataset.Dataset.take_subset#

Dataset.take_subset(subset: None | dict[str, float | int | str | list[float | int | str]] = None) None[source]#

Take a subset of the dataset.

Calling this method will alter the fileinfo attribute.

Parameters:

subset (dict, optional) – If specified, load only a subset of the dataset. All keys in the dictionary must be present in the fileinfo dataframe inferred by infer_fileinfo(). Values can be either float, int , str or a list of these.

Raises:
  • ValueError – If dictionary key is not a column in the fileinfo dataframe.

  • TypeError – If dictionary key or value is not of valid type.