get_cmt#

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

Get the cmt (compartment) column from the model dataset

If a cmt column is present this will be extracted otherwise a cmt column will be created. If created, multiple dose compartments are dependent on the presence of an admid type column, otherwise, dose/non-dose will be considered.

Parameters:

model (Model) – Pharmpy model

Returns:

pd.Series – CMT