I am trying to convert a dict
data from a JSON file to a Pandas DataFrame. I have the following original data:
{'error': False, 'message': '', 'dailyGain': [[{'date': '01/06/2020', 'value': 0, 'profit': 0}], [{'date': '01/07/2020', 'value': 0.42, 'profit': 12.59}], [{'date': '01/08/2020', 'value': -14.49, 'profit': -447.42}], [{'date': '01/09/2020', 'value': -12.47, 'profit': 362.38}], [{'date': '01/10/2020', 'value': -12.6, 'profit': -4.28}]]}
I am trying to get a DataFrame like this:
date value profit
01/06/2020 0 0
01/07/202 0.42 12.59
...... ...... ......
...... ...... ......
However, I am getting the following error:
AttributeError: 'list' object has no attribute 'values'
Can you help me solve this issue?