Python Pandas CSV import / Unicode woes
<p>I am working with message board posts (contained in <code>CSV</code> files), trying to clean data/etc, before training classification models. </p>

<p>Things were going well, until I got:</p>

<blockquote>
  <p>TypeError: 'float' object is not iterable</p>
</blockquote>

<p>in response to the line:</p>

<pre><code>letters_only = ''.join([i for i in textToProcess if not i.isdigit()])
</code></pre>

<p>Where textToProcess comes from <code>(train["text"][i])</code>.</p>

<p>So... when I thought to check on my data by making calls to:</p>

<pre><code>print train.isnull().sum()
print test.isnull().sum()
</code></pre>

<p>I got the following output:</p>

<pre><code>id          0
category    0
title       0
text        1
train       26
dtype:      int64
id          5512
category    5512
title       5512
text        5512
train       5512
dtype: int64
</code></pre>

<p><strong>Question</strong>: So I take this to mean that in the test set, there are 5512 null values in every column? </p>

<p>This would be odd, since the imports, etc. appeared to be behaving as expected for the most part until this point. For example, calls to e.g. <code>train["text"][0]</code> produced the expected output (namely text).</p>

<p>In case it helps, my original read_csv import calls looked like: </p>

<pre><code>train = pd.read_csv(full_train_filename, header=0, encoding = 'utf-8')

test = pd.read_csv(full_test_filename, header=0, encoding = 'utf-8')`
</code></pre>

<p>I'm not sure there is a single direct question here, but am hoping that someone sees something I've done wrong.</p>

<p>Any thoughts would be greatly appreciated. </p>