ETLT and CRISP

This commit is contained in:
Yam ZhengLim
2022-11-29 20:23:27 +08:00
parent 22ed4e23e9
commit 0def9a4c54
15 changed files with 217 additions and 92 deletions
+12 -1
View File
@@ -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