selecting rows in a tuplelist in pandas
<p>I have a list of tuples as below in python:</p>

<pre><code>   Index        Value
     0         (1,2,3)
     1         (2,5,4)
     2         (3,3,3)
</code></pre>

<p>How can I select rows from this in which the second value is less than or equal 2?</p>

<p><strong><em>EDIT:</em></strong></p>

<p>Basically, the data is in the form of <code>[(1,2,3), (2,5,4), (3,3,3)....]</code></p>

<pre><code>df[df["Value"].str[1] &lt;= 2]
</code></pre>

<p>You can read this for more details - <a href="http://pandas.pydata.org/pandas-docs/stable/text.html#indexing-with-str" rel="nofollow">http://pandas.pydata.org/pandas-docs/stable/text.html#indexing-with-str</a></p>

python pandas tuples