Drop specific rows from multiindex Dataframe
<p>I have a multi-index dataframe that looks like this:</p>

<pre><code> start      grad
 1995-96    1995-96 15  15  
            1996-97 6   6   
            2002-03 1   1   
            2007-08 1   1   
</code></pre>

<p>I'd like to drop by the specific values for the first level (level=0). In this case, I'd like to drop everything that has 1995-96 in the first index.</p>

<p><code>pandas.DataFrame.drop</code> takes level as an optional argument</p>

<p><code>df.drop('1995-96', level='start')</code></p>

<p>As of v0.18.1, its docstring says:</p>

<blockquote>
<pre><code>"""
Signature: df.drop(labels, axis=0, level=None, inplace=False, errors='raise') 
Docstring: Return new object with labels in requested axis removed.

    Parameters
    ----------
    labels : single label or list-like
    axis : int or axis name
    level : int or level name, default None
        For MultiIndex
    inplace : bool, default False
        If True, do operation inplace and return None.
    errors : {'ignore', 'raise'}, default 'raise'
        If 'ignore', suppress error and existing labels are dropped.

    .. versionadded:: 0.16.1
"""
</code></pre>
</blockquote>

python pandas