I am trying to append a list looking like this
myList = ['2018-01-12', 'MMM', 'BUY', 42, 236.5229]
to an empty dataframe (with "header" / columns names).
To create the dataframe I've done the following:
tradeLog = pd.DataFrame(columns=["DATE", "TICKER", "ORDER_TYPE", "AMOUNT", "PRICE"])
I am trying to append the list as a row in the following way:
tradeLog.append(myList, ignore_index=True)
(NOTICE: My goal i to iterate over some data - a lot of lists in the same format - and the add them one by one to the dataframe)
tradeLog.loc[len(tradeLog)] = my_list