I know that there have been questions similar to this, but I've not yet been able to figure out how to do what I need to. I'm trying to take some JSON and move it into a Pandas DataFrame.
{
"friends": [
{
"name": "Joe Jimmy",
"timestamp": 1541547573
},
{
"name": "Steven Peterson",
"timestamp": 1541274647
}
]
}
I'd like the corresponding DataFrame to look like this:
Name Timestamp
1 "Joe Jimmy" "1541547573"
2 "Stephen Peterson" "1541274647"
I think the problem is that first nested "friends," but I'm not sure, as I'm new to JSON (and Pandas, really).
I've tried bringing it in via
with open('data.json') as f:
friends = json.load(f)
And then moving it to a dataframe via the Panadas DataFrame constructor, but I'm not getting out anything but this:
{'name': 'Brian B.S. Sheehan', 'timestamp': 15...}