bids.variables.BIDSRunVariableCollection

class BIDSRunVariableCollection(variables, sampling_rate=None)[source]

A container for one or more RunVariables–i.e., Variables that have a temporal dimension.

Parameters
  • variables (list) – A list of SparseRunVariable and/or DenseRunVariable.

  • sampling_rate (float) – Sampling rate (in Hz) to use when working with dense representations of variables. If None, defaults to 10.

Notes

Variables in the list must all be at the ‘run’ level. For other levels (session, subject, or dataset), use the BIDSVariableCollection.

Methods

clone(self)

Returns a shallow copy of the current instance, except that all variables are deep-cloned.

from_df(data[, entities, source])

Create a Collection from a pandas DataFrame.

match_variables(self, pattern[, …])

Return columns whose names match the provided pattern.

matches_entities(self, entities[, strict])

Checks whether current Collection’s entities match the input.

merge_variables(variables, \*\*kwargs)

Concatenates Variables along row axis.

resample(self[, sampling_rate, variables, …])

Resample all dense variables (and optionally, sparse ones) to the specified sampling rate.

to_df(self[, variables, format, sparse, …])

Merge columns into a single pandas DataFrame.

__init__(self, variables, sampling_rate=None)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(self, variables[, sampling_rate])

Initialize self.

clone(self)

Returns a shallow copy of the current instance, except that all variables are deep-cloned.

from_df(data[, entities, source])

Create a Collection from a pandas DataFrame.

match_variables(self, pattern[, …])

Return columns whose names match the provided pattern.

matches_entities(self, entities[, strict])

Checks whether current Collection’s entities match the input.

merge_variables(variables, \*\*kwargs)

Concatenates Variables along row axis.

resample(self[, sampling_rate, variables, …])

Resample all dense variables (and optionally, sparse ones) to the specified sampling rate.

to_df(self[, variables, format, sparse, …])

Merge columns into a single pandas DataFrame.