Filter relevant columns on DataFrames
This commit is contained in:
parent
7eba74b3ef
commit
3e811338c4
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue