bids.variables.BIDSVariableCollection

class BIDSVariableCollection(variables)[source]

A container for one or more variables extracted from variable files at a single level of analysis.

Parameters

variables (list) – A list of BIDSVariables or SimpleVariables.

Notes

Variables in the list must all share the same analysis level, which must be one of ‘session’, ‘subject’, or ‘dataset’ level. For run-level Variables, use the BIDSRunVariableCollection.

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.

merge_variables(variables, \*\*kwargs)

Concatenates Variables along row axis.

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

Merge variables into a single pandas DataFrame.

__init__(self, variables)[source]

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

Methods

__init__(self, variables)

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.

merge_variables(variables, \*\*kwargs)

Concatenates Variables along row axis.

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

Merge variables into a single pandas DataFrame.