From c2753910886c87dd7738b6822dec7809ee1690f3 Mon Sep 17 00:00:00 2001 From: coolneng Date: Wed, 9 Dec 2020 22:31:30 +0100 Subject: [PATCH] Fix dataframe normalization --- src/P2/preprocessing.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/P2/preprocessing.py b/src/P2/preprocessing.py index e3871f5..4324d0f 100644 --- a/src/P2/preprocessing.py +++ b/src/P2/preprocessing.py @@ -46,9 +46,10 @@ def normalize_numerical_values(df) -> DataFrame: "TOT_MUERTOS", ] filtered_df = df.filter(items=cols) - normalized_df = normalize(X=filtered_df) - updated_df = df.update(normalized_df) - return updated_df + normalized_data = normalize(X=filtered_df) + normalized_df = DataFrame(data=normalized_data, columns=filtered_df.columns) + df.update(normalized_df) + return df def parse_data(source, action) -> DataFrame: