Skip to content

Instantly share code, notes, and snippets.

View selfcontrol7's full-sized avatar
🎯
Focusing & Learning

Milandu Keith Moussavou Boussougou selfcontrol7

🎯
Focusing & Learning
View GitHub Profile
"""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):
@mappingvermont
mappingvermont / pandas_join.py
Created April 3, 2017 21:36
join pandas DFs and write to CSV using multiprocessing
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']