Home > database >  While performing SQL query in python using pandas i am facing the error : TypeError: __init__() got
While performing SQL query in python using pandas i am facing the error : TypeError: __init__() got

Time:01-28

enter image description here

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.

  • Related