title: Assign values with for loops to pandas DataFrame columns
body: <p>I am a Python beginner and have a problem with a for loop. I want to assign a list of numbers to different DataFrame columns. Manually, I can assign my values with the correct code, but copy and paste isn't a good style for programming.</p>
  
  <p>The correct manual code looks like this:</p>
  
  <pre><code>df = pd.DataFrame(columns=['a', 'b', 'c'], index=range(100))
  num = [100,200,300]
  df['a'] = num[0]
  df['b'] = num[1]
  df['c'] = num[2]
  
  df.head()
       a    b    c
  0  100  200  300
  1  100  200  300
  2  100  200  300
  3  100  200  300
  4  100  200  300
  </code></pre>
  
  <p>My for loop is the following:</p>
  
  <pre><code>df = pd.DataFrame(columns=['a', 'b', 'c'], index=range(100))
  for s in strings:
      for n in num:
          df[s] = n
  
  df.head()
  
       a    b    c
  0  300  300  300
  1  300  300  300
  2  300  300  300
  3  300  300  300
  4  300  300  300
  </code></pre>
  
  <p>Can anyone help me to write a for loop that works like my manual code?</p>