Trying to compile sql query in python. Which i used to do very frequently in python. But never faced this error in my past. Help me in fixing the same.
Query: from pandasql import sqldf import pandas as pd from sklearn import datasets
Q10="select bucket,count(*) as COUNT,min(probability) as MINSCORE,max(probability) as MAXSCORE,(avg(probability)100) as PREDDEFRATE,sum(response) as RESPONSE,count()-sum(response) as NONRESPONSE from score group by 1;"
Bucket_Details = sqldf(Q10,globals()) display(Bucket_Details)
TypeError: init() got multiple values for argument 'schema'
Thanks in Advance.
CodePudding user response:
I got the same error using sqldf function, it happened the same worked in the past but it's not working for a table.
CodePudding user response:
Install an earlier version of sqlalchemy. Sqlalchemy version 2.0.0 was released yesterday and isn't compatible with pandasql.