title: How to loop over my data series and return a list instead of an individual value?
body: <p>I have been trying to create a function that loops over my data, standardizes the values, and finally, puts the new values into a list. Here is what I am trying:</p>
  <pre><code>def standardize( num_list):
      s = np.std(num_list)
      Xmean = np.mean(num_list)
      for i in num_list:
          Xstd = (i - Xmean)/s
          
          
      return Xstd
  </code></pre>
  <p>The function I have created only returns a single value.
  Next I tried this:</p>
  <pre><code>def standardize( num_list):
      s = np.std(num_list)
      Xmean = np.mean(num_list)
      for i in num_list:
          Xstd = (i - Xmean)/s
          list = print(Xstd)
      return
  </code></pre>
  <p>This is printing all the values I want, however, it is not placing them in a list. What am I missing to create a list?</p>