Add dataframe column assertion

This commit is contained in:
2020-06-12 19:21:50 +02:00
parent 6849078d88
commit a20dab0053
4 changed files with 14 additions and 7 deletions

View File

@@ -1,5 +1,7 @@
from json import dump
from requests import get
from constants import FILES, URL
@@ -22,6 +24,7 @@ def save_json(data, dataset):
def request_dataset(dataset):
"""
Fetches the requested dataset from opendata's API
Raises an exception if there's an HTTP error
"""
url = format_url(dataset)
response = get(url)

View File

@@ -1,6 +1,8 @@
from json import load
from pandas import json_normalize, DataFrame
from constants import FILES, COLUMNS
from pandas import DataFrame, json_normalize
from constants import COLUMNS, FILES
def open_json(dataset) -> dict: