Given a nested json, is there a way to load and flatten it in vaex?
This is a way to do it in pandas:
import pandas as pd
from pandas.io.json import json_normalize
df = pd.read_json(input_file)
df = pd.concat([df, json_normalize(df['eventData'])], axis=1)
The json could be something like this:
[
{"timestamp":..., "id": ..., "eventData": {"type":..., "name":...}},
{"timestamp":..., "id": ..., "eventData": {"type":..., "name":...}}
]
And the dataframe's columns should be "timestamp", "id", "type" and "name".