I have a multi indexed file with values such as these
How could I plot a dataframe that has separate lines for each symbol in the same graph?
I have a multi indexed file with values such as these
How could I plot a dataframe that has separate lines for each symbol in the same graph?
I believe you need pivot for all unique symbol values :
df1 = df.pivot(index='4.timestamp', columns='1.symbol', values='2.price')
If possible duplicated is becessary aggregate by DataFrame.pivot_table:
df1 = df.pivot_table(index='4.timestamp', columns='1.symbol', values='2.price', aggfunc='mean')
and then plot by DataFrame.plot:
df1.plot()