Filter relevant columns on DataFrames

This commit is contained in:
coolneng 2020-06-10 21:48:44 +02:00
parent 7eba74b3ef
commit 3e811338c4
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 2 additions and 1 deletions

View File

@ -18,4 +18,5 @@ def create_dataframe(dataset) -> DataFrame:
""" """
json = open_json(dataset) json = open_json(dataset)
df = json_normalize(data=json, record_path=["records"], errors="ignore",) df = json_normalize(data=json, record_path=["records"], errors="ignore",)
return df filtered_df = df.filter(items=COLUMNS[dataset])
return filtered_df