Conditional row select with Pandas
<p>I want to select a sub-set of a pandas dataframe <code>df</code> where the column <code>text</code> has the value <code>'0.0, 0.0'</code>. I thought the command for this would be <code>df.ix[df['text'] == "0.0, 0.0"]</code> but this returns</p>

<pre><code>&lt;console&gt;:1: error: identifier expected but symbol literal found.
   df.ix[df['text'] == "0.0, 0.0"]
            ^
&lt;console&gt;:1: error: unclosed character literal
   df.ix[df['text'] == "0.0, 0.0"]
                 ^
</code></pre>

<p>What am I doing wrong?</p>

<p>As <a href="http://stackoverflow.com/users/487339/dsm">DSM</a> pointed out, the error appears to be an error from the Scala programming language. This is because I was using a Zeppelin Notebook, and had failed to specify that the code should be interpreted with the pyspark interpreter. After specifying the interpreter, the code worked as expected.</p>

python pandas