skrub.DataOp.skb.get_data#

DataOp.skb.get_data()[source]#

Collect the values of the variables contained in the DataOp.

Returns:
dict mapping variable names to their values

Variables for which no value was given do not appear in the result.

See also

DataOp.skb.get_vars

Obtain the variables (the skrub.var() objects) themselves.

DataOp.skb.set_data

Set new values for the variables.

Examples

>>> import skrub
>>> a = skrub.var('a', 0)
>>> b = skrub.var('b', 1)
>>> c = skrub.var('c') # note no value
>>> e = a + b + c
>>> e.skb.get_data()
{'a': 0, 'b': 1}