title: Why do I get double colums when I append a dataframe without creating an empty dataframe?
body: <pre><code>txtfile=open('university_towns.txt','r')
  df=pd.DataFrame(columns=('State','Region'))
  state=''
  for i in txtfile:
      if '[edit]' in i:
          i=i[:i.find('[')].strip()
          state=i
          continue
      region=i.strip()
      if '(' in region:
          k=region.find('(')
          region=region[:(k-1)]
      df = df.append(pd.DataFrame([[state, region]]), ignore_index=True)
  print(df)
  </code></pre>
  
  <p>In this code if I have already created an empty dataframe with column-names: <code>State</code> and <code>Region</code>. Now when I try to append the values <code>state</code> and <code>region</code>, obtained from parsing a text file, to dataframe, it's showing two extra columns named <code>State</code> and <code>Region</code> with <code>NaN</code> values. and another two columns named 0 and 1 with the actual values of state and region.</p>
  
  <p>Now I changed the code like this:</p>
  
  <pre><code>#def get_list_of_university_towns():
  txtfile=open('university_towns.txt','r')
  df=pd.DataFrame(columns=('State','Region'))
  state=''
  for i in txtfile:
      if '[edit]' in i:
          i=i[:i.find('[')].strip()
          state=i
          continue
      region=i.strip()
      if '(' in region:
          k=region.find('(')
          region=region[:(k-1)]
  df.loc[:,'State']=state
  df.loc[:,'Region']=region
  print(df)
  </code></pre>
  
  <p>Its showing empty data frame.The input is file copied from this Wikipedia page given in the link <a href="https://en.wikipedia.org/wiki/List_of_college_towns#College_towns_in_the_United_States" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/List_of_college_towns#College_towns_in_the_United_States</a></p>