sksurv.column.
categorical_to_numeric
Encode categorical columns to numeric by converting each category to an integer value.
table (pandas.DataFrame) – Table with categorical columns to encode.
encoded – Table with categorical columns encoded as numeric. Numeric columns in the input table remain unchanged.
pandas.DataFrame