datawork.api.data¶
Module implementing abstract Data class.
-
class
datawork.api.data.
Data
(desc=None, name=None)[source]¶ Data placeholder class.
This class represents data that has either not yet been computed, or is furthermore not fully specified. Classes inheriting
Data
implement placeholders for specific data types, e.g. Pandas dataframes or numpy arrays.Subclasses of
Data
are typically instantiated by invocations ofTool
.Thus
Data
andInvocation
are connected and form the backbone of the computational graph, withTool
objects connected toInvocation
as objects that can be configured.Note that the provider attribute itself an
Invocation
, can be “partial”, in which case the data object itself is callable. When called, arguments are passed to the provider which will create new invocations; potentially now non-partial ones.-
__init__
(desc=None, name=None)[source]¶ Construct a placeholder data object.
Parameters: - desc – a plain-text description of this data object
- name – a short-hand name for this data object
-
classmethod
constant
(val, name='constant')[source]¶ Create a constant from appropriately typed variable.
-
data
¶ Getter for data attribute.
-