I have a JSON file in the following format:
[
{
"positionmessage": {
"name": "ship-1",
"sog": 0,
"latitude": 51.82284,
"eni": "02010000",
"mmsi": "100000"
}
},
{
"positionmessage": {
"name": "ship-2",
"sog": 0,
"latitude": 51.81966,
"eni": "02020000",
"mmsi": "200000"
}
},
{
"positionmessage": {
"name": "ship-2",
"sog": 0,
"latitude": 51.8196,
"eni": "02020000",
"mmsi": "200000"
}
},
{
"positionmessage": {
"name": "ship-3",
"sog": 0,
"latitude": 51.8225,
"eni": "02030000",
"mmsi": "300000"
}
},
{
"positionmessage": {
"name": "ship-4",
"sog": 0,
"latitude": 51.8291,
"eni": "02040000",
"mmsi": "400000"
}
}
]
I would like to get a pandas dataframe with the variables on the columns:
- column 1: name
- column 2: SOG
- column 3: latitude, etc.
On the rows should be the content of all columns. How do I do this?