Add dataframe creation test
This commit is contained in:
@@ -10,7 +10,7 @@ filenames = {
|
||||
"deconfinement-parking-relais-doublement-des-places": "relay-parking",
|
||||
}
|
||||
files = {
|
||||
"cycling-paths": "../data/cycling-paths.json",
|
||||
"relay-parking": "../data/relay-parking.json",
|
||||
"home-delivery": "../data/home-delivery.json",
|
||||
"cycling-paths": "data/cycling-paths.json",
|
||||
"relay-parking": "data/relay-parking.json",
|
||||
"home-delivery": "data/home-delivery.json",
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from json import load
|
||||
from pandas import read_json, json_normalize, DataFrame
|
||||
from constants import files
|
||||
from pandas import json_normalize, DataFrame
|
||||
from app.constants import files
|
||||
|
||||
|
||||
def open_json(dataset):
|
||||
|
||||
@@ -6,7 +6,7 @@ from json import dump, dumps
|
||||
|
||||
|
||||
def save_json(data, filename):
|
||||
data_dir = "../data/"
|
||||
data_dir = "data/"
|
||||
with open(data_dir + filename + ".json", "w") as f:
|
||||
dump(data, f, ensure_ascii=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user