This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Extract nested values from a JSON tree.""" | |
def json_extract(obj, key): | |
"""Recursively fetch values from nested JSON.""" | |
arr = [] | |
def extract(obj, arr, key): | |
"""Recursively search for values of key in JSON tree.""" | |
if isinstance(obj, dict): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import feather | |
import os | |
import pandas as pd | |
import multiprocessing | |
folder_path = r'/home/ubuntu/raster-vector-to-tsv/output/925ff7f3-c08b-4de5-a385-469e0b26975a/final_tsv/' | |
csv_list = [os.path.join(folder_path, x) for x in os.listdir(folder_path) if os.path.splitext(x)[1] == '.tsv'] | |