get_column_name#
- pharmpy.modeling.get_column_name(model, type)[source]#
Retrieve the column with a certain type
If multiple columns have the same type an exception will be raised.
- Parameters:
model (Model) – Pharmpy model
type (str) – Column type. See :py:attr:pharmpy.model.datainfo.ColumnInfo.type
- Returns:
str or None – Name of the column. None if no column found
Example
>>> from pharmpy.modeling import load_example_model, get_column_name >>> model = load_example_model("pheno") >>> get_column_name(model, "dose") 'AMT'