I am struggling to get some json information to appear in a dataframe column
The information is 'data_at': 1619293080600
Here is what I have so far:
requestT = requests.get('https:............)
json_dataT = json.loads(requestT.text)
print(json_dataT)
Output:
{'data_at': 1619293080600, 'data': {'london_NW': {'loc_postcode': 'NW1', 'loc_name': 'camden_twn', 'ave_price': '1061227.00'}, 'london_SW': {'loc_postcode': 'SW1', 'loc_name': 'victoria', 'ave_price': '1878130.00'}}}
I then transform this into a dataframe via the following method:
df = pd.DataFrame(json_dataT)
dfNormal = json_normalize(df['data'])
However, I lose the 'data_at' information which is a timestamp that I want in column 0. What I get is the following:
loc_postcode loc_name ave_price
0 NW1 camden_twn 1061227.00
1 SW1 victoria 1878130.00
How can I get the 'data_at' (timestamp) to appear as the first column?