I have a `.csv` file and it gets updated every day. Below is the example of my `.csv` file

[![enter image description here](https://i.stack.imgur.com/aZoOK.png)](https://i.stack.imgur.com/aZoOK.png)

I am pushing this `.csv` file into SQL Server using Python. My script reads the `.csv` file and uploads it into a SQL Server database.

This is my Python script:

```
import pandas as pd
import pyodbc

df = pd.read_csv ("C:/Users/Dhilip/Downloads/test.csv")

print(df)

conn = pyodbc.connect('Driver={SQL Server};'
                      'Server=DESKTOP-7FCK7FG;'
                      'Database=test;'
                      'Trusted_Connection=yes;')
cursor = conn.cursor()

#cursor.execute('CREATE TABLE people_info (Name nvarchar(50), Country nvarchar(50), Age int)')

for row in df.itertuples():
    cursor.execute('''
                INSERT INTO test.dbo.people_info (Name, Country, Age)
                VALUES (?,?,?)
                ''',
                row.Name, 
                row.Country,
                row.Age
                )
conn.commit()

```

The script is working fine. I am trying to automate my Python script using batch file and task scheduler, and it's working fine. However, whenever I add new data in the `.csv` file and SQL Server gets updated with new data and the same time it prints the old data multiple times.

Example, if I add new record called Israel, the output appears in SQL Server as below

[![enter image description here](https://i.stack.imgur.com/DlJ53.png)](https://i.stack.imgur.com/DlJ53.png)

I need output as below,

[![enter image description here](https://i.stack.imgur.com/esdGW.png)](https://i.stack.imgur.com/esdGW.png)

Can anyone advise me the change I need to do in the above python script?