pandas - how to apply filter on one variable considering other two variable using python -


i having data variables participants, origin, , score. , want participants , origin score greater 60. means filter participants have consider origin , score. can filter on origin or on score not work.

if can me, great!!!

i think can use boolean indexing:

df = pd.dataframe({'participants':['a','s','d'],                    'origin':['f','g','t'],                    'score':[7,80,9]})  print (df)   origin participants  score 0      f                 7 1      g            s     80 2      t            d      9  df = df[df.score > 60] print (df)   origin participants  score 1      g            s     80 

Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -