title: Cut data at given value
body: <p>Hei</p>
  <p>I tried to cut a data set at a given value. I want to get a new set only containing the data from index 0 till the index where the values in the data get bigger than the given value --&gt; data[0:i]. (I made sure, with another function, that the data contains each value only once and that they are sorted from smallest to biggest.)</p>
  <pre><code> def identify_lower_region(dat, max_value, dist=1.):
          &quot;&quot;&quot;Identify upper region in meassurement 
  
      Arguments:
          dat {dataframe} -- Dataframe with two meassurements (e.g. height and pressure)
  
      Keyword Arguments:
          max_value{int} -- maximum value of observation interval
         
      &quot;&quot;&quot;
      press= dat.query(&quot;`High`&lt;@max_value&quot;)['Pressure']
  
      return press
  </code></pre>
  <p>The error I get.</p>
  <pre><code>SyntaxError: invalid syntax
  </code></pre>
  <p>Do I have to set a defautl to the max_value, as it could be that the exact max_value does not occure in the data set? And how do I fix the syntax? I use python 3.7</p>
  <p>Thanks!</p>