There's a few posts like this already, but after following them I still encounter some issues.
trade = client.get_my_trades(symbol=ticker) # fetching all trades made on the ticker IOSTBTC
print(trade)
json_trade = json.dumps(trade, indent=4) # converting and indenting for easier readability.
print(json_trade+"\n")
json_normalised = json_normalize(trade) # normalising with pandas for spreadsheet use
print("Normalised JSON\n", json_normalised)
json_normalised = DataFrame(pandas.read_json("logs.xlsx"))
json_normalised_str = str(json_normalised)
logs = open("logs.xlsx", "w") # creating file to write to
logs.write(json_normalised_str) # writing data to file, oldest first
This code runs fine, with no erros. However, when I check the logs.xlsx, all the data is in a single column, with spaces in between where they should be separated by columns.
For example, here's some of the JSON data:
[{'id': 3084149, 'orderId': 7071890, 'price': '0.00000312', 'qty': '400.00000000', 'commission': '0.00041327', 'commissionAsset': 'BNB', 'time': 1522223234240, 'isBuyer': True, 'isMaker': True, 'isBestMatch': True}, {'id': 3084468, 'orderId': 7073272, 'price': '0.00000314', 'qty': '400.00000000', 'commission': '0.00041694', 'commissionAsset': 'BNB', 'time': 1522223910252, 'isBuyer': False, 'isMaker': True, 'isBestMatch': True}]
What I want is for 'id' and 'orderId' and 'price' (et cetera) to have it's own column. With the above data I would have two rows of information. But instead, this is what I recieve when I use this data: 
What can I do?
