bids.variables.SimpleVariable

class SimpleVariable(name, data, source, **kwargs)[source]

Represents a simple design matrix column that has no timing information.

Parameters:
  • name (str) – Name of the column.

  • data (pandas.DataFrame) – A pandas DataFrame minimally containing a column named ‘amplitude’ as well as any identifying entities.

  • source (str) – The type of BIDS variable file the data were extracted from. Must be one of: ‘events’, ‘physio’, ‘stim’, ‘regressors’, ‘scans’, ‘sessions’, ‘participants’, or ‘beh’.

  • kwargs (dict) – Optional keyword arguments passed onto superclass.

Methods

apply(func[, groupby])

Applies the passed function to the groups defined by the groupby argument.

clone([data])

Clone (deep copy) the current column, optionally replacing its data and/or any other attributes.

filter([filters, query, strict, inplace])

Returns a copy of the current Variable with only rows that match the filters retained.

get_grouper([groupby])

Return a list suitable for use in groupby calls.

merge(variables[, name])

Merge/concatenate a list of variables along the row axis.

select_rows(rows)

Truncate internal arrays to keep only the specified rows.

split(grouper)

Split the current SparseRunVariable into multiple columns.

to_df([condition, entities])

Convert to a DataFrame, with columns for name and entities.

__init__(name, data, source, **kwargs)[source]

Methods

__init__(name, data, source, **kwargs)

apply(func[, groupby])

Applies the passed function to the groups defined by the groupby argument.

clone([data])

Clone (deep copy) the current column, optionally replacing its data and/or any other attributes.

filter([filters, query, strict, inplace])

Returns a copy of the current Variable with only rows that match the filters retained.

get_grouper([groupby])

Return a list suitable for use in groupby calls.

merge(variables[, name])

Merge/concatenate a list of variables along the row axis.

select_rows(rows)

Truncate internal arrays to keep only the specified rows.

split(grouper)

Split the current SparseRunVariable into multiple columns.

to_df([condition, entities])

Convert to a DataFrame, with columns for name and entities.