title: csv.writer Append a csv file with new data only
body: <p>I have a script that is used to scrape data from a website and stores it into a spreadsheet</p>
  
  <pre><code>with open("c:\source\list.csv") as f:
    for row in csv.reader(f):
      for url in row:
        r = requests.get(url)
        soup = BeautifulSoup(r.content, 'lxml')
        tables = soup.find('table', attrs={"class": "hpui-standardHrGrid-table"})
            for rows in tables.find_all('tr', {'releasetype': 'Current_Releases'})[0::1]:
          item = []
          for val in rows.find_all('td'):
            item.append(val.text.strip())
        with open('c:\output_file.csv', 'a', newline='') as f:
          writer = csv.writer(f)
          writer.writerow({url})
          writer.writerows(item)
  </code></pre>
  
  <p>As of right now, when this script runs, about 50 new lines are added to the bottom of the CSV file (Totally expected with the append function) but what I would like it to do is to determine if there are duplicate entries in the CSV file and skip them, and then change the mismatches. </p>
  
  <p>I feel like this should be possible but I can't seem to think of a way</p>
  
  <p>Any thoughts?</p>