GetGo-AI / src /data_processing /preprocess_data.py
pphuc25's picture
chore: add file
5cfff57
raw
history blame contribute delete
No virus
626 Bytes
import json
import os
def load_json(path):
with open(path, 'r') as f: return json.load(f)
data = load_json("/home/pphuc/Coding/Project/trip-personal-advise/data/processed/locations.json")
categories = data.keys()
for category in categories:
types = data[category]
for type in types:
for data_th in data[category][type]:
if data_th["ShowInSearchResult"]:
print(data_th["ShowInSearchResult"])
# if data_th["Promotions"]:
# print(data_th["Promotions"])
# keys_unuse = ["SpecialDesc", "AdsProviders", "CategoryGroupKey", "ReviewsTest", "PromotionPlainTitle"]