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
()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
(pattern[, return_type, …])Return columns whose names match the provided pattern.
merge_variables
(variables, **kwargs)Concatenates Variables along row axis.
to_df
([variables, format, fillna, entities, …])Merge variables into a single pandas DataFrame.
Methods
__init__
(variables)Initialize self.
clone
()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
(pattern[, return_type, …])Return columns whose names match the provided pattern.
merge_variables
(variables, **kwargs)Concatenates Variables along row axis.
to_df
([variables, format, fillna, entities, …])Merge variables into a single pandas DataFrame.