title: Python not equating empty cell with ""
body: <p>Python noob here. I am working on a project and I am getting some strange results. I have managed to duplicate the results in a small example. I saved the following in Excel as a csv file:</p>
  <pre><code>var 1,var 2
  20,a
  10,a
  ,a
  5,a
  4,a
  0,a
  1,a
  21,a
  </code></pre>
  <p>I am trying to count how many empty pieces of data there are (i.e. 1)</p>
  <pre><code>test = pd.read_csv(&quot;test.csv&quot;)
  print(test[test[&quot;var 1&quot;]==&quot;&quot;].count())
  test[&quot;var 1&quot;].replace(&quot;&quot;, &quot;Unknown&quot;, inplace=True) 
  print(test[test[&quot;var 1&quot;]==&quot;&quot;].count())
  print(test[test[&quot;var 1&quot;]==&quot;Unknown&quot;].count())
  print(test[test[&quot;var 1&quot;]== 0].count()) 
  </code></pre>
  <p>The output is:</p>
  <pre><code>var 1    0
  var 2    0
  dtype: int64
  var 1    0
  var 2    0
  dtype: int64
  var 1    0
  var 2    0
  dtype: int64
  var 1    1
  var 2    1
  dtype: int64
  </code></pre>
  <p>So for some reason Python is not counting the empty data as &quot;&quot;. I then later use the following code to send the data back to a new csv file in hope that I can find out how to reference them.</p>
  <p>The csv that I receive is shown as:</p>
  <pre><code>var 1
  20.0
  10.0
  &quot;&quot;
  5.0
  4.0
  0.0
  1.0
  21.0
  </code></pre>
  <p>As you can see the data is sent back as &quot;&quot;. I am trying to perform tasks based on the condition that the data == &quot;&quot;, but obviously can't as the data is not being stored as &quot;&quot;. Does anybody know how the data is stored?</p>
  <p>All help is appreciated,</p>
  <p>C.</p>