title: Creating a numpy array after a for loop
body: <p>I have this DataFrame:</p>
  <pre><code>df4=pd.DataFrame({'Date':['2020-05-19'],
                   'A':[153],
                   'B':[139],
                   'C':[165],
                   'D':[165],
                   'E':[123],
                   'F':[135],
                   'G':[137],})
  
  df4['Date']=pd.to_datetime(df4['Date'])
  df4 = df4.set_index('Date')
  </code></pre>
  <p>Then I transformed df in order to work with numpy</p>
  <pre><code>row=df4.to_records()[0]
  
  amount = 10000
  </code></pre>
  <p>And I created this for loop:</p>
  <pre><code>for i in np.arange(1,len(row),1):
      test=amount/row[i] if row[i]&lt;=150 else 0
      print(test)
  </code></pre>
  <p>This is the result of the variable <code>test</code>:</p>
  <pre><code>0
  71.94244604316546
  0
  0
  81.30081300813008
  74.07407407407408
  72.99270072992701
  </code></pre>
  <p>And I would like to know if there is a way to transform all the results of <code>test</code> into a numpy array? Hence the result should be something like this :</p>
  <pre><code>test = [0,71.94244604316546,0,0,81.30081300813008,74.07407407407408,72.99270072992701]
  </code></pre>
  <p>Thanks</p>