title: Pandas : Getting indexes of a series providing multiple filters
body: <p>I am iterating over a dataframe. In each iteration, I need to get indexes of the series where the value is equal 5 or 4. Following code gives me the indexes where the value is 5 ( another problem: actually i am getting both index and the value. Another problem is getting only the index. I tried <code>print row[row ==5].index[0]</code> but it does not do the job for me)</p>
  
  <pre><code>def get_top_rated_movies(user_ratings):
  for index, row in user_ratings.iterrows():
      print row[row == 5]
  </code></pre>
  
  <p>I think I have to do <code>row[row == 5 || row == 4]</code> kind of a thing but have no idea.</p>
  
  <p>here 'user_ratings' is a dataframe. Each row is a user and column is a movie where I store users ratings for movies. I need to get the movies which got 4 or 5 ratings for each user. So, I iterate over the dataframe and above code gives me (both movie id and rating)</p>
  
  <pre><code>movie_id
  1      5
  9      5
  13     5
  15     5
  16     5
  19     5
  32     5
  42     5
  45     5
  48     5
  50     5
  55     5
  57     5
  59     5
  87     5
  </code></pre>