title: Function to find if a date exists and if so print that row of the dataframe
body: <p>I am trying to create a function that takes in a date and scans the DF for this date in a date column, the date column is in datetime format. Once it finds the date I want it to return the matching orders row from the dataframe: I have managed to make a start on this like so, but I cant get the return I want:</p>
  <p>e.g DF</p>
  <pre><code>          date     orders
  5351660 2020-08-03  1011
  5351719 2020-08-04  1012
  5812943 2020-08-05  1013
  5814499 2020-08-06  2565
  5350549 2020-08-07  5555
  5350484 2020-08-08  2546
  5813992 2020-08-09  8945
  5351067 2020-08-10  6965
  5350968 2020-08-11  1236```
  
  
  
  ```def weekoforders(date):
      x = df1['date'].eq(date).any() else 'no'
      return df1[df1['orders'] == x]
  
  weekoforders('2020-08-07')
  </code></pre>