title: How to add columns repeatedly into a dataframe in python3
body: <p>I'm currently writing a function to simulate the wealth in the coin flip game. f is the percentage I will invest my money(AUM) into this game. I simulate 10000 steps, at every step, I want to include the AUM number into my wealth list.Thus, at the end of the 10000 steps, I will have a list containing 10001 numbers (includes AUM =100). In the end, I want to have a dataframe (10001*100) with each column corresponding to a wealth series with different f (column names) invested. But my below codes keeps poping errors:</p>
  
  <p>raise TypeError(msg)
  TypeError: cannot concatenate object of type ""; only pd.Series, pd.DataFrame, and pd.Panel (deprecated) objs are valid </p>
  
  <p>or</p>
  
  <p>ValueError: Length of values does not match length of index</p>
  
  <p>Could anyone help me how to solve this issue (add 100 series, each with 10001 elements, into a dataframe)? Many thanks!</p>
  
  <pre><code>df = pd.DataFrame()
  wealth = [100] ### initial AUM
  def path(f): 
      global AUM
      global wealth
      for j in range(10000):  ### one simulation with 10,000 steps
          if Ber_Dist_V [j] == 1: ### Bernouli distribution
              AUM = AUM * (1-f) + AUM * f * (1 + win)
          else:
              AUM = AUM * (1-f) + AUM * f * (1 + lose)
          wealth.append(AUM)
      wealth = pd.Series(wealth)
      df[f]=wealth
  
  weight = np.linspace(0, 1, 100,endpoint=False).tolist()
  for f in weight:
      path_weight(f) 
  </code></pre>