I want to insert a record with psycopg2. The code is simple:
import psycopg2
query = """
INSERT INTO xxx (lon,lat)
VALUES(%s,%s)"""
cursor.execute(query, (df2['lon'],df2['lat']))
conn.commit()
cursor.close()
conn.close()
However the code does not work and raised the below error:
psycopg2.ProgrammingError: can't adapt type 'Series'
How do I solve the issue?