0

I look for accessing to all elements where the second index equal 'P0 (YI)' but my command doesn't work. Can somebody help me ?

>>> G11
<class 'pandas.core.frame.DataFrame'>
MultiIndex: 10000 entries, (s0000, Averaging) to (s0999, P0 (YI))
Data columns (total 3 columns):
Volume    10000  non-null values
dtypes: float64(3)

>>> G11.ix[(:,'P0 (YI)')]
  File "<stdin>", line 1
    G11.ix[(:,'P0 (YI)')]
            ^
SyntaxError: invalid syntax
1

2 Answers 2

2

Use G11.xs('P0 (YI)',level=1)

The syntax that you are suggesting will be available in 0.14, see here

Sign up to request clarification or add additional context in comments.

Comments

0

try

G11.xs('P0 (YI)', level=1)

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.