Need help for boolean slicing
<p>I have a dataframe. I woud like to slice based on a comparison between the 2 columns. For instance in the following example I would like to extract rows where column <code>x</code> is larger than column <code>y</code>:</p>

<pre><code>d = pd.DataFrame({'x':[1, 2, 3, 4, 5], 'y':[4, 5, 6, 7, 8]})

d[d[:"x"]&gt;d[:"y"]]
</code></pre>

<p>By doing so I get an error:</p>

<blockquote>
  <p>"unhashable type: 'slice'"</p>
</blockquote>