drop_dropped_columns#

pharmpy.modeling.drop_dropped_columns(model)[source]#

Drop columns marked as dropped from the dataset

NM-TRAN date columns will not be dropped by this function even if marked as dropped. Columns not specified in the datainfo ($INPUT for NONMEM) will also be dropped from the dataset.

Parameters:

model (Model) – Pharmpy model object

Returns:

Model – Pharmpy model object

Example

>>> from pharmpy.modeling import *
>>> model = load_example_model("pheno")
>>> model = drop_dropped_columns(model)
>>> list(model.dataset.columns)
['ID', 'TIME', 'AMT', 'WGT', 'APGR', 'DV', 'FA1', 'FA2']

See also

drop_columns

Drop specific columns or mark them as drop