title: Duplicate entries created when appending column to array in Python
body: <p>I am new to Python and could use some help. Essentially I am trying to scrape code from a hockey league website so I can pull it into Excel to see if all the teams in my division have an equal amount of late time slots.</p>
  
  <p>I wrote some code to scrape the games from each of the teams in the division. There are 10 teams and each team has 16 games so there should be 160 results. The entries are getting duplicated somehow and I am getting 320 results.</p>
  
  <p>I think this is happening because I am trying to append the team name to an array that holds the parsed data I scraped before writing it to a Pandas DataFrame. When I remove the code to add the name to the dataset in the array I get the expected amount of results (160), but then my dataset doesn't have the team name associated with each game.</p>
  
  <p>I know I could just delete the duplicate data, but I am trying to understand why I am getting this duplicate data and how I could fix the code to avoid this.  Any help is much appreciated.</p>
  
  <pre><code>import requests
  from bs4 import BeautifulSoup
  import numpy as np
  import pandas as pd
  
  #define list of teams
  teamIDs = np.array([[11954, "A Warthog"], [11945, "Blast"], [11951, "Cobra Kai"], [11947, "Homer's Heroes"], [11946, "Hudson Dusters"], [11952, "Le National"], [11948, "Les Boys"], [11953, "Molar Bears"], [11949, "NYAC"], [11950, "Top Shelf"]])
  
  #define dataframe to store data
  df = pd.DataFrame(columns=['date','day','time', 'teamname'])
  
  #loop through team pages based on teamIDs stored in array to scrape data
  for num in range(len(teamIDs)):
      r = requests.get('https://apps.dashplatform.com/dash/index.php?Action=team/index&amp;company=chelsea&amp;teamid={}'.format(teamIDs[num][0]))
      soup = BeautifulSoup(r.text, 'lxml')
  
      #loop through all game entries on the page and add them to the dataframe
      for li in soup.find_all('li'):
              try:
                  #find &lt;li&gt; tags with specific class that holds data points as a string
                  gameentry = li.find('h4', class_='list-group-item-heading').text
  
                  #split string apart and assign to array
                  games = gameentry.split()
  
                  #add team name to array
                  games.append(teamIDs[num][1])
  
                  #add result to the dataframe
                  df.loc[df.shape[0]] = games
  
              except AttributeError:
                  continue
  
  #output dataframe to excel file
  writer = pd.ExcelWriter('output.xlsx')
  df.to_excel(writer,'Sheet1')
  writer.save()
  </code></pre>