Selecting a column on a multi-index pandas DataFrame

Viewed 7133

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 a chart with: X-axis: 1,2,3. The three series names are: bar, baz, foo. Y-axis values: 'one' column. The label next to each dot is the 'two' column.

So, in other words, say I have three stocks (bar, baz, & foo), with each of them having its respective stock price ('one') for each date (1,2,3), and the comment for each dot is at the 'two' column. How can I chart that?

(Sorry for not showing the df table, I don't know how to copy it correctly)

1 Answers
Related