help me write python code to insert new records into a postgres database table called InterimTrafficInOutFactors imported from a csv file with columns Id,VenueId,VendorId,LocationId,TrafficInFactor,TrafficOutFactor
help me write python code to insert new records into a postgres database table called InterimTrafficInOutFactors imported from a csv file with columns Id,VenueId,VendorId,LocationId,TrafficInFactor,TrafficOutFactor,VenueName,VendorName,LocationName,Date

Here is a sample code that demonstrates how to insert new records into a PostgreSQL database table named "InterimTrafficInOutFactors" from a CSV file:

```python
import psycopg2
import csv

# Establish a connection to the PostgreSQL database
conn = psycopg2.connect(
    dbname="your_database_name",
    user="your_username",
    password="your_password",
    host="your_host",
    port="your_port"
)

# Create a cursor object to interact with the database
cur = conn.cursor()

# Open the CSV file and read its content
with open('your_csv_file.csv', 'r') as csvfile:
    reader = csv.DictReader(csvfile)

    # Iterate through each row in the CSV file
    for row in reader:
        # Extract the values from the CSV row
        id = row['Id']
        venue_id = row['VenueId']
        vendor_id = row['VendorId']
        location_id = row['LocationId']
        traffic_in_factor = row['TrafficInFactor']
        traffic_out_factor = row['
cursor.execute("INSERT INTO InterimTrafficInOutFactors (Id, VenueId, VendorId, LocationId, TrafficInFactor, TrafficOutFactor) VALUES (%s, %s, %s, %s, %s, %s)", (
    id,
    venue_id,
    vendor_id,
    location_id,
    traffic_in_factor,
    traffic_out_factor
))