pharmpy.modeling.set_property#
- pharmpy.modeling.set_property(model_or_datainfo, column, property, value)[source]#
Specify a property of a column
See
pharmpy.DataInfo.propertiesfor documentation on data properties.- Parameters:
model_or_datainfo (Model | DataInfo) – Model object or DataInfo object
column (str) – Name of a column. If the column contains multiple variables, e.g. DV with multiple DVs, the ID can be specified with a colon. For example “DV:1” will mean the DV column only when DVID is 1.
property (str) – Name of the property to set
value (Any) – Value of the property to set
- Returns:
Model | DataInfo – An updated Model or DataInfo object
Example
>>> from pharmpy.modeling import load_example_model, set_property >>> model = load_example_model("pheno") >>> model = set_property(model, "APGR", "categories", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
See also