Given this DataFrame:
from pandas import DataFrame arrays = [['bar', 'bar', 'baz', 'baz', 'foo', 'foo'], ['one', 'two', 'one', 'two', 'one', 'two']] tuples = zip(*arrays) index = pd.MultiIndex.from_tuples(tuples, names=['first', 'second']) df = DataFrame(randn(3, 6), index=[1, 2, 3], columns=index)
How can I plot with: X axis: 1,2,3. The names of the three series: bar, baz, foo. Y axis values: one column. The label next to each dot is a two column.
So, in other words, let's say I have three stocks (bar, base and foo), each of which has its own corresponding stock price ("one") for each date (1,2,3), and a comment for each point is in column two. How to do it?
(Sorry for not showing the df table, I don't know how to copy it correctly)