title: Pandas TypeError: object of type 'float' has no len()
body: <p>I'm doing some data-discovery using Python/Pandas.</p>
  
  <p>MVCE: I have a CSV file with some street addresses and I want to find the length of the longest address in my file. (this is a simplified version of my actual problem)</p>
  
  <p>I wrote this simple Python code:</p>
  
  <pre><code>import sys
  import pandas as pd
  
  df = pd.read_csv(sys.argv[1])
  
  print(df['address'].map(len).max())
  </code></pre>
  
  <p>The address column is of type str, or so I thought (see below).</p>
  
  <p>Why then do I get this error?</p>
  
  <pre><code>Traceback (most recent call last):
    File "eval-lengths.py", line 8, in &lt;module&gt;
      print(df['address'].map(len).max())
    File "C:\Python35\lib\site-packages\pandas\core\series.py", line 2996, in map
      arg, na_action=na_action)
    File "C:\Python35\lib\site-packages\pandas\core\base.py", line 1004, in _map_values
      new_values = map_f(values, mapper)
    File "pandas/_libs/src\inference.pyx", line 1472, in pandas._libs.lib.map_infer
  TypeError: object of type 'float' has no len()
  </code></pre>
  
  <p>Here's the output of <code>df.info()</code></p>
  
  <pre><code>RangeIndex: 154733 entries, 0 to 154732
  Data columns (total 2 columns):
  address    154510 non-null object
  zip        154732 non-null object
  dtypes: object(2)
  memory usage: 2.4+ MB
  </code></pre>
  
  <p><em>UPDATE</em></p>
  
  <p>Here's a sample CSV file</p>
  
  <pre><code>address,zip
  555 APPLE STREET,82101
  1180 BANANA LAKE ROAD,81913
  577 LEMON DR,81911
  ,99999
  </code></pre>
  
  <p>The last line is key to reproducing the problem.</p>