title: How can I insert a column that concatenates 2 other columns' data together in python using pandas
body: <p>I would like to use pandas to populate a column by concatenating 2 other columns in the dataframe.</p>
  
  <p>Input Table</p>
  
  <pre><code>City    State
  Boston  MA
  Austin  TX
  </code></pre>
  
  <p>I want to add a 'Location' column.<br>
  Input Table</p>
  
  <pre><code>City    State    Location
  Boston  MA       Boston, MA
  Austin  TX       Austin, TX
  </code></pre>
  
  <p>Currently, this is the code I'm using:</p>
  
  <pre><code>df['Location'] = None
  for i in range(len(df)):
      df.Location[i] = str(df.loc[i, 'City']) + ", " + str(df.loc[i, 'State'])
  </code></pre>
  
  <p>I've tried using these 2 methods:</p>
  
  <pre><code>df['Location'] = '{}, {}'.format(str(df['City']), str(df['State']))
  df['Location'] = str(df['City']) + ', ' + str(df['State'])
  </code></pre>
  
  <p>But only get this output:</p>
  
  <pre><code>City    State    Location
  Boston  MA       Boston
  Austin  TX       Austin
  </code></pre>
  
  <p>If you could also explain why I'm getting these results, that would be helpful in my future understanding of pandas.</p>