sksurv.column.categorical_to_numeric

sksurv.column.categorical_to_numeric(table)

Encode categorical columns to numeric by converting each category to an integer value.

Parameters:table (pandas.DataFrame) – Table with categorical columns to encode.
Returns:encoded – Table with categorical columns encoded as numeric. Numeric columns in the input table remain unchanged.
Return type:pandas.DataFrame