title: pandas iterrows() skipping specified row
body: <p>I'm running a loop in my code that pulls SQL queries from an excel sheet saved on my computer and then executes that query. Each time the query is done running, it goes to the next row and does this until there are no more queries. However, i want to add where the user can skip a certain row if they would like (for run time purposes). Here's what my loop looks like right now:</p>
  
  <pre><code>    selected_rows = ['1', '2', '4', '5']
  
      for index, row in loop_file.iterrows():
          print('run(): ' + row['Name'])
          query = row['Logic']
          inner_df = pd.read_sql_query(query, conn)
          if inner_df.empty:
              continue
          inner_df['project_id'] = pr_id
          inner_df['logic_name'] = row['Name']
          outer_df = pd.concat([outer_df, inner_df], axis=0, ignore_index=True, sort=False)
  
      clean_up = 'if object_id ('tempdb..#table') is not null drop table #table'
  
      cursor.execute(clean_up)
  
      return outer_df
  </code></pre>
  
  <p>So selected_rows would be the rows that the user selected from the UI, skipping query 3. What's the most effective way to accomplish what I'm trying to do? Thanks for any pointers or tips!</p>