BPt.Dataset.add_scope#

Dataset.add_scope(scope, scope_val, inplace=False)[source]#

This method is designed as helper for adding a new scope val to a number of columns at once, using the existing scope system. Don’t be confused about the arguments, the scope parameter is used to select the columns in which the scope_val should be added as a scope to those columns.

See Scope for more information on how scope’s are used in BPt. This function specifically is for adding custom, tag-like, scopes to certain columns.

Parameters
scopeScope

A BPt style Scope used to select a subset of column in which to add new scopes (scope_val) to.

scope_valstr or array-like of str

A single string scope value to add to the columns select by scope, or an array-like of scope values to all add to the selected col. E.g.,

scope_val = '1'

Would add ‘1’ as a scope

scope_val = ['1', '2']

Would add ‘1’ and ‘2’ as scopes.

inplacebool, optional

If True, do operation inplace and return None.

default = False