to_placeholderΒΆ
Factory function for extracting placeholders from a
DataFrame
or View
.
- Example:
Suppose we wanted to create a
DataModel
:dm = getml.data.DataModel( population_train.to_placeholder("population") ) # Add placeholders for the peripheral tables. dm.add(meta.to_placeholder("meta")) dm.add(order.to_placeholder("order")) dm.add(trans.to_placeholder("trans"))
But this is a bit repetitive. So instead, we can do the following:
dm = getml.data.DataModel( population_train.to_placeholder("population") ) # Add placeholders for the peripheral tables. dm.add(getml.data.to_placeholder( meta=meta, order=order, trans=trans))