I'm trying to get a dictionary with multiple list values and one string in to one dataframe.
Here's the information i'm trying to get in to the dataframe:
{'a': ['6449.70000', '1', '1.000'],
'b': ['6446.40000', '1', '1.000'],
'c': ['6449.80000', '0.04879000'],
'h': ['6449.90000', '6449.90000'],
'l': ['6362.00000', '6120.30000'],
'o': '6442.30000',
'p': ['6413.12619', '6353.50910'],
't': [5272, 16027],
'v': ['1299.86593468', '4658.87787321']}
The 3 values represented by key "a" all have their own names, say a1, a2 and a3 then b1, b2, and b3.. Preferably i want to define them myself. This goes for all information. So there should be 19 columns.
I've read a lot about this.
- Take multiple lists into dataframe
- https://pythonprogramming.net/data-analysis-python-pandas-tutorial-introduction/
- http://pbpython.com/pandas-list-dict.html
- Video tutorials youtube
Based on these readings i think i could iterate trough it with a for loop, build separate dataframes and then join/merge them. But that seems more work then i think is required.
What is the most efficient / readable / logic way to do this using Python 3.6?