So I have this JSON
{
"data": [
{
"id": 2674,
"timestamp": "2022-07-01",
"vendor_name": "test",
"npi_id": "1234567890",
"trigger_description": "test",
"echo_order": 0,
"duration": "0",
"image_url": "https://....",
"name": "Banner Ad Name 1",
"triggers": ["test "]
},
{
...
Which I am reading like so df = pd.read_json("./data/data.json", typ="frame")
The output is ...
> python main.py
data
0 {'id': 2674, 'timestamp': '2022-07-01', 'vendo...
1 {'id': 2675, 'timestamp': '2022-07-01', 'vendo...
2 {'id': 6789, 'timestamp': '2022-07-01', 'vendo...
3 {'id': 2321, 'timestamp': '2022-07-01', 'vendo...
4 {'id': 5678, 'timestamp': '2022-07-01', 'vendo...
5 {'id': 1234, 'timestamp': '2022-07-01', 'vendo...
I am looking to extract certain cols from the output. But for the life of me I can't figure out how. The data is within the key data which is a list.
When you do df.columns on the dataframe you only get Index(['data'], dtype='object')
How can i get inside data and extract what i need