How to display a row based on specific columns and values
<p>Let's say I have this dataframe:</p>

<pre><code>Type    |    Killed
Dog            5
Cat            7
Dog            9
Dog           10
Dog            6
Cat            2
Cow            1
</code></pre>

<p>I would like to display the row where the number of dogs killed is more than 7.</p>

<p>My desired outcome would be:</p>

<pre><code>Type    |    Killed
Dog            9
Dog           10
</code></pre>

<p>Thank you!</p>

<p>You can select within a column by:</p>

<pre><code>df.loc[(df['Killed'] &gt; 7) &amp; (df.index == 'Dog')]
</code></pre>

python pandas