comparing a string with a panda dataframe
<p>This is how my dataframe looks like:</p>

<pre><code>df2.head()
             brand  brand_len
3   [delta]         1        
5   [whirlpool]     1        
11  [toro]          1        
15  [insinkerator]  1        
16  [sunjoy]        1     
</code></pre>

<p>When I want to compare a string <code>Q=['delta','pandas']</code> with my df2, I don't get any match. This is how I am doing it:</p>

<pre><code>#check for exact similarity
Q = ['delta','pandas']
for q in Q:
    print q
    for brand in df2.brand:
        print brand
        if q==brand:
            print brand
</code></pre>

<p>This is the output:</p>

<pre><code>             brand  brand_len
3   [delta]         1        
5   [whirlpool]     1        
11  [toro]          1        
15  [insinkerator]  1        
16  [sunjoy]        1        
delta
[u'delta']
[u'whirlpool']
[u'toro']
[u'insinkerator']
[u'sunjoy']
</code></pre>

<p>How can I get rid of the u presented in my brand variable.</p>