# How should I add reference key column to output after modeling is Complete?

0

I have created a csv of data with the following columns: (1) app_key (2) churn, (3)tenure

https://i.stack.imgur.com/NAlFF.png

I have performed the following code in order to drop app_key and churn

test_data = pd.read_csv('/Users/lawrence/Downloads/CHS_August_v4.csv')
test_data_ready = test_data.drop(labels = ["Churn", "app_key"],axis = 1)


I dropped the app_key column so that I could perform an XGBoost operation on the data set. Given that the app_key field is just a customer key, I needed to remove that in order to run by XGBoost operation. You can see the XGBoost operaton below.

  test_model = xgb_model.predict_proba(test_data_ready)[:, 1]
explainer = shap.TreeExplainer(xgb_model)

shap_output['app_key'] = test_data['app_key']