title: Create a data frame out of input_t (which is actually three numbers and act as features ) and output_t as output
body: <p>This is my code</p>
  
  <pre><code>output_data = []
  out = ''
  i = 0
  P = 500
  X = 40000
  while i&lt;600:
      subVals = values[i:i+X]
      signal=subVals.val1
      signal, rpeaks = biosppy.signals.ecg.ecg(signal, show=False)[1:3]
      rpeaks=rpeaks.tolist()
      nni = tools.nn_intervals(rpeaks)
      fre = fd.welch_psd(nni)
      tm = td.nni_parameters(nni)
      f1=(fre['fft_peak'])
      t1=(tm['nni_min'])
      f11=np.asarray(f1)
      t11=np.asarray(t1)
      input_t=np.append(f11,t11)
      output_t=subVals.BLEEDING
      output_t=int(round(np.mean(output_t)))
      i+=P
  </code></pre>
  
  <p>As you see we are in a loop and the goal here is to create a data frame or a csv file from input_t and output_t. Here is an example of them in one loop</p>
  
  <pre><code>input_t
  array([2.83203125e-02, 1.21093750e-01, 3.33984375e-01, 8.17000000e+02])
  output_t
  0
  
  </code></pre>
  
  <p>I am trying to create matrix where for every rows, the first three columns is one iteration of input_t and last column is output_t.  Based on the code, since i needs to be less than 600 and the initial value of i is 0 and the step is 600 so we have two loops which makes it 2 rows in total and 5 columns(4 values from input_t and 1 value from output_t) . I tried append, I tried something like out+="," but I am not sure why that is not working  </p>