title: How to return multiple rows of data from pandas df?
body: <p>I am doing an SQL like search through thousands of lines of an excel file. What i am using is working, but i now need to return all values and having a hard time figuring it out.</p>
  <pre><code>| Col1 | Col2 | Col3 | Col4 | Col5 | Col6 |
  |------|------|------|------|------|------|
  |123467|123231|134521|Data00|Info00|Here00|
  |976443|1224ff|14xec1|Data01|Info01|Here01|
  |123467|12wf41|34qqa1|Data02|Info02|Here02|
  </code></pre>
  <p>I am using:</p>
  <pre><code>boolean = []
  entry = 123467
  dictionary_df = pd.read_excel(my_xlsx)
  for col in range(3):
      for row in dictionary_df[dictionary_df.columns[col]]:
          if entry in str(row):
              boolean.append(True)
          else:
              boolean.append(False)
      if True in boolean:
          is_long = pd.Series(boolean)
          data1 = dictionary_df[is_long][Col4].values[0]
          data2 = dictionary_df[is_long][Col5].values[0]
          data3 = dictionary_df[is_long][Col6].values[0]
  </code></pre>
  <p>So what I am doing is searching all 3 columns, and making a list of True false, and then if it found the result, it grabs the data i need from column 4-6.  This works but it only returns the values from column 4,5,6 for the last one found, not both. What i need in this situation is to be able to have data1 be a list containing(Data00, Data02). I cannot figure out how to include both results (or many) from the way I am doing this.</p>