title: Extract several values from a row when a certain value is found using a list
body: <p>I have a .csv file with 29 columns and 1692 rows.
  The columns <code>D_INT_1</code> and <code>D_INT_2</code> are just dates.
  I want to check for these 2 columns if there is dates between :<code>&gt;= &quot;2022-03-01&quot; and &lt;= &quot;2024-12-31</code>.
  And, if a value is found, I want to display the date found + the value of the column <code>&quot;NAME&quot;</code> that is located on the same row of said found value.</p>
  <p>This is what I did right now, but it only grab the dates and not the adjacent value <code>('NAME')</code>.</p>
  <pre><code># importing module
  import pandas as pd
  # reading CV file
  df = pd.read_csv(&quot;scratch_2.csv&quot;)
  
  # converting column data to list
  D_INT_1 = df['D_INT_1'].tolist()
  D_INT_2 = df['D_INT_2'].tolist()
  
  
  
  ext = []
  
  ext = [i for i in D_INT_1 + D_INT_2 if i &gt;= &quot;2022-03-01&quot; and i &lt;= &quot;2024-12-31&quot;]
  
  print(*ext, sep=&quot;\n&quot;)
  </code></pre>
  <p>This is what I would like to get:</p>
  <p>Example of DF:</p>
  <pre><code>NAME, ADDRESS, D_INT_1, D_INT_2
  Mark, H4N1V8, 2023-01-02, 2019,-01-01
  </code></pre>
  <p>Expected output:</p>
  <pre><code>MARK, 2023-01-02
  </code></pre>