how to apply filter on one variable considering other two variable using python
<p>I am having data with variables <code>participants</code>, <code>origin</code>, and <code>score</code>. And I want those participants and origin whose score is <code>greater than 60</code>. That means to filter participants I have to consider origin and score. I can filter only on origin or only on score but it will not work.</p>

<p>If anyone can help me, its great!!!</p>

<p>I think you can use <a href="http://pandas.pydata.org/pandas-docs/stable/indexing.html#boolean-indexing" rel="nofollow"><code>boolean indexing</code></a>:</p>

<pre><code>df = pd.DataFrame({'participants':['a','s','d'],
                   'origin':['f','g','t'],
                   'score':[7,80,9]})

print (df)
  origin participants  score
0      f            a      7
1      g            s     80
2      t            d      9

df = df[df.score &gt; 60]
print (df)
  origin participants  score
1      g            s     80
</code></pre>

python pandas indexing condition tableau