Survival Analysis, Python, Aft, Cox Ph, Machine Learning.
pd.get_dummies(data["ph.ecog"], prefix = 'ecog') dummies_ecog.head(4) Dummy coding Concatenating with Original Data Once dummy coding is done, we will concatenate the two columns, i.e., ecog_1 and ecog_2 column wise in our original dataset. Next, we need to drop the original categorical variable,