I am pulling multiple Items from an API, when i pass the Json Data to a dataframe the information from the second, third etc. is added to the right of the data frame instead of below it.
Additionally, the column headers are equal to the body in the request. how do i change this?
How information is currently:
Body.Date | Body.Stock.Apple | Body.Type | Body.Date | Body.ABC.Stock.FB | Body.ABC.Type |
20190101 |99 |Series |20190101 | 100 |Series
20190201 |98 |series |20190201 | 98 |Series
20190301 |97 |Series |20190301 | 101 |Series
How i want it to look:
Date |Stock |Price
20190101| Apple |99
20190201| Apple |98
20190101| FB |100
20190201| FB |98
20190301| FB |101
Basically dropping the columns i do not want / repeated, making the Stock prices a single column and renaming the column headers. I have 800+ stocks i need to do this for, so looking for a very automated solution