From 1060677d1fc9fcde7a3611808a7c36c7dd67b334 Mon Sep 17 00:00:00 2001 From: coolneng Date: Wed, 9 Dec 2020 22:49:09 +0100 Subject: [PATCH] Filter dataframe after data parsing --- src/P2/preprocessing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/P2/preprocessing.py b/src/P2/preprocessing.py index 4324d0f..6dbf838 100644 --- a/src/P2/preprocessing.py +++ b/src/P2/preprocessing.py @@ -55,5 +55,6 @@ def normalize_numerical_values(df) -> DataFrame: def parse_data(source, action) -> DataFrame: df = read_csv(filepath_or_buffer=source, na_values="?") processed_df = process_na(df=df, action=action) - normalized_df = normalize_numerical_values(df=processed_df) + filtered_df = filter_dataframe(df=processed_df) + normalized_df = normalize_numerical_values(df=filtered_df) return normalized_df