title: Comparing values of two columns and filtering the data in pandas dataframe
body: <p>I have a large dataset of 3 columns product, region and sales. Suppose there are 2 products(A, B) and 2 regions(1, 2)(Region is of numeric dtype). What I am doing is this to filter the data according to a particular product and a particular region : </p>
  
  <pre><code>data[(data['Product'] == 'A') &amp; (data['Region'] == 1)]
  </code></pre>
  
  <p>Above code is giving the filtered data. But later on I have done categorical encoding on product w.r.t sales so that I can train the model as product will become numeric dtype from categorical encoding. I have done categorical encoding because I have 2000 products in the dataset.
  So when I am trying this after encoding 'Product' column:</p>
  
  <pre><code>data[(data['Product'] == 1.231) &amp; (data['Region'] == 1)]
  </code></pre>
  
  <p>It gives empty dataframe, no rows in it.
  What could be the reason behind it? And I want to filter the data after encoding but it is not giving any data.</p>