How to create edges in existing mesh based on a list of vertex indices with Python
I simplified it a bit. I later found out I had a syntax error in my loop - I was doing the right thing in principle before.
The object you are adding edges to has to be selected and in edit mode when running the script.

import bpy
import csv, os, bmesh, math

#filepaths
filepath = bpy.data.filepath
directory = os.path.dirname(filepath)

verts = []
edges = []
faces = []



csvedges = directory+"/csv/3d-edges.csv"



edgesReader = csv.reader(open(csvedges, newline=''), delimiter=',')


current_obj = bpy.data.objects["wave"]  # particular object by name


obj = bpy.context.object
bm = bmesh.from_edit_mesh(obj.data)


if hasattr(bm.verts, "ensure_lookup_table"): 
    bm.verts.ensure_lookup_table()

with open(csvedges, 'rt', encoding="utf8") as csvfile2:
    edgesReader = csv.reader(csvfile2, delimiter=',', quotechar='|')
    for idy, row in enumerate(edgesReader):
        if (idy &gt; 0) :
            #print(idy)
            bm.edges.new((bm.verts[int(row[0])], bm.verts[int(row[1])]))