Is it possible to keep the 'column' order in a Pandas DataFrame after parsing JSON data using json_normalize
.
Some of my code:
for row in json_data["results"]["companies"]:
if df is None:
df = json_normalize(row["companie"])
else:
df = pd.concat([df, json_normalize(row["companie"])])
Now the columns are sorted alphabetically but I want to keep them in the same order as in the JSON data.