cur.execute(
    'INSERT INTO %s (day, elapsed_time, net_time, length, average_speed, geometry) VALUES (%s, %s, %s, %s, %s, %s)'
    , (escaped_name, day, time_length, time_length_net, length_km,
    avg_speed, myLine_ppy))
Psycopg2 Insert Into Table with Placeholders