I am trying to pass a parameter to a pandas dataframe database query but I cant quite get the syntax right. What am I missing? This works for default python, not pandas and unfortunately the pandas docs dont help. I also tried googling the standard mentioned with no luck. My query works fine when I replace the %s
with the actual category id
sqlQuery='''SELECT aa.*
FROM ballot aa
WHERE categoryId = %s
'''
df1=pd.read_sql_query(sqlQuery,connectionObject,'529') #trying to pass in 529