Open isthisthat opened 5 years ago
Even though the following is valid sql, pandasql gives an error:
pandasql
import pandasql as pdsql df1 = pd.DataFrame({ 'name': ['Joe', 'Bill', 'Bob'], 'weight': [70, 85, 75] }) q = 'select * from "df1"' print(pdsql.sqldf(q, locals()))
PandaSQLException: (sqlite3.OperationalError) no such table: df1 [SQL: 'select * from "df1"']
Removing the quotes around the table name fixes this. This makes me slightly nervous about pandasql's handling of quotes and backticks :|
try: q = 'select * from df1'
Even though the following is valid sql,
pandasql
gives an error:Removing the quotes around the table name fixes this. This makes me slightly nervous about
pandasql
's handling of quotes and backticks :|