title: Get minimum value in an array of floats till it's exhausted in python
body: <p>Suppose I have an array <code>a=[1.8 1.2 2.2 1.6]</code>. I want to write a code so that I can get the smallest value till the values in the array are exhausted.</p>
  <p>The desired output at the first step:</p>
  <p><code>1.2</code></p>
  <p>This value is then assigned to <code>int_SOC</code> and acts as an input for a while loop below:</p>
  <pre><code>fin_SOC = 3.2
  i=0
      while True:
          if int_SOC &lt; fin_SOC:
              int_SOC += output_params.iloc[i, 3]
          else:
              break
          
          i+=1
          print(int_SOC)
  </code></pre>
  <p>Only at the end of this while loop <code>int_SOC</code> should get the next smallest value that is in our case <code>1.6</code>.</p>
  <p>Here, <code>output_params</code> is a pandas time-series data frame.</p>
  <p>As the next step, we are left with an array <code>a=[1.8 2.2 1.6]</code>. Now the desired output: <code>1.6</code> which is again assigned to <code>int_SOC</code> and <code>while</code> loop is again executed.</p>
  <p>And so on...</p>