title: How can I count the number of floats or integers in a column of a Pandas dataframe?
body: <p>I have a Pandas Dataframe and there is a column which is of float type. But numbers with decimals don't make sense for this column. So I want to find out how many floats are in this column and after that I want to delete the whole row where I have a float in this column.
  An alternative could be to count the number of integers and subtract this from the number of rows overall.</p>
  <p>example Dataset</p>
  <p>What I have:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">A</th>
  <th style="text-align: left;">B</th>
  <th style="text-align: left;">C</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">0.5</td>
  <td style="text-align: left;">0.1</td>
  <td style="text-align: left;">2.0</td>
  </tr>
  <tr>
  <td style="text-align: left;">0.8</td>
  <td style="text-align: left;">0.9</td>
  <td style="text-align: left;">3.5</td>
  </tr>
  <tr>
  <td style="text-align: left;">0.6</td>
  <td style="text-align: left;">0.2</td>
  <td style="text-align: left;">1.0</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>What I need:</p>
  <p>First count floats or integers:</p>
  <p>C 1 (as there is only one float in column &quot;C&quot; or) alternatively: C 2 (as there are two integers in column &quot;C&quot;)</p>
  <p>Second delete rows with floats:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">A</th>
  <th style="text-align: left;">B</th>
  <th style="text-align: left;">C</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">0.5</td>
  <td style="text-align: left;">0.1</td>
  <td style="text-align: left;">2.0</td>
  </tr>
  <tr>
  <td style="text-align: left;">0.6</td>
  <td style="text-align: left;">0.2</td>
  <td style="text-align: left;">1.0</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I tried to handle this problem the same way I handled my Missing Values, but this did not work.</p>
  <pre><code># Count Integers
  print(Data.is_integer().sum())
  </code></pre>
  <pre><code># Delete rows where &quot;C&quot; is not an integer
  Data=Data.drop(Data[Data.C.is_integer()=0].index)
  
  </code></pre>
  <p>Both Did not work.I am using Python in Colab btw</p>