I have a list of tuples similar to the below:
[(date1, ticker1, value1),(date1, ticker1, value2),(date1, ticker1, value3)]
I want to convert this to a DataFrame with index=date1
, columns=ticker1
, and values = values
. What is the best way to do this?
EDIT:
My end goal is to create a DataFrame with a datetimeindex equal to date1 with values in a column labeled 'ticker':
df = pd.DataFrame(tuples, index=date1)
Right now the tuple is generated with the following:
tuples=list(zip(*prc_path))
where prc_path is a numpy.ndarray with shape (1000,1)