It seems that your data1 is not a list of dictionaries, but dictionary with ‘cashier’ key and list of dictionaries as value. You can call executemany function this way:
or if your data1 store values for different cashiers and you assign to cashier variable a specified value, you can use executemany function this way:
cashier = input("cashier name: ") mycursor.executemany(insert_query, data1[cashier])
CLICK HERE to find out more related problems solutions.