I am currently having a 1000 JSON's in the following format, each for a single employee:
"A": "A_text",
"B": "Datetime stamp of record",
"ID": "123",
"FeatureList": {
"Salary": 100000,
"Age": 45,
"Work Ex": 15,
}
}
My goal is to recursively concatenate these files into one df (see below):
In my current solution: I can recursively add all files after formatting with:
rootdir ='/folderpath/filename'
all_files = Path(rootdir).rglob('*.json')
I am able to read the file and transpose it with below:
df = pd.read_json('data.json')
df = df.transpose()
But the array buffer look-alike "FeatureList" is creating distorted orientation if I drop or create new columns.
Any advise on my approach would really help. Thanks