mirror of
https://gitlab.com/cief-data/data-management.git
synced 2026-08-19 04:13:57 +00:00
ETLT and CRISP
This commit is contained in:
+12
-1
@@ -1,6 +1,7 @@
|
||||
import json
|
||||
from operator import concat
|
||||
import os
|
||||
import pandas as pd
|
||||
|
||||
def read_json_file(path, name):
|
||||
try:
|
||||
@@ -24,4 +25,14 @@ def delete_csv_in_path(path):
|
||||
|
||||
def change_to_current_directory():
|
||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
os.chdir(script_dir)
|
||||
os.chdir(script_dir)
|
||||
|
||||
|
||||
def json_normalize_to_df(json):
|
||||
try:
|
||||
df = pd.json_normalize(json)
|
||||
return df
|
||||
except Exception as e:
|
||||
print(e)
|
||||
print("[FUNCTION_ERROR]-json_normalize_to_df")
|
||||
return False
|
||||
Reference in New Issue
Block a user