I am trying to select a query in mysql where the employee_id is a number from a list of values. Below is the query that I thought should work.
import mysql.connector
employee_id_list = [10,15]
sql = "select value, employee_id " \
"from employee_table " \
"where employee_id in %s "
df = pd.read_sql(sql,conn,params=[tuple(employee_id_list)])
However, it produces the following error:
Python type tuple cannot be converted
Is there a way to make this work?