From 2e9b8db645dbea19019e861a10dc4b8dcc8ba4dc Mon Sep 17 00:00:00 2001 From: Arzaan <25bee110@nith.ac.in> Date: Wed, 3 Jun 2026 03:08:29 +0530 Subject: [PATCH] Fix region dummy variables - only 3 columns were created Changed drop_first=True to False and dropped region_northeast as reference category. --- insurance.ipynb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/insurance.ipynb b/insurance.ipynb index bc89d6a..791426c 100644 --- a/insurance.ipynb +++ b/insurance.ipynb @@ -1517,7 +1517,8 @@ "metadata": {}, "outputs": [], "source": [ - "df_cleaned = pd.get_dummies(df_cleaned,columns = ['region'],drop_first=True)" + "df_cleaned = pd.get_dummies(df_cleaned, columns=['region'], drop_first=False)", + "df_cleaned = df_cleaned.drop(columns=['region_northeast']) # northeast as reference" ] }, {