From 3e811338c4b22a2d33d34d2936f346dd00464833 Mon Sep 17 00:00:00 2001 From: coolneng Date: Wed, 10 Jun 2020 21:48:44 +0200 Subject: [PATCH] Filter relevant columns on DataFrames --- app/preprocessing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/preprocessing.py b/app/preprocessing.py index 400473c..c276843 100644 --- a/app/preprocessing.py +++ b/app/preprocessing.py @@ -18,4 +18,5 @@ def create_dataframe(dataset) -> DataFrame: """ json = open_json(dataset) df = json_normalize(data=json, record_path=["records"], errors="ignore",) - return df + filtered_df = df.filter(items=COLUMNS[dataset]) + return filtered_df