我对使用Sqlite3还很陌生.try 进行查询时出现错误.
我的疑问是:
%sql SELECT "Elementary, Middle, or High School" FROM chicago_public_schools_data LIMIT 1;
错误:
- Sqlite:/Social EconoEconic.db (sqlite3.OperationalError)Near"or":语法错误 [SQL:从Chicago_Public_School_Data Limit 1中 Select 小学、初中或高中;] (此错误的背景信息为:https://sqlalche.me/e/20/e3q8)
我确信列名是匹配的,可以通过 Select 所有列来控制,或者使用‘df.Columns’打印.
索引([‘School_ID’,‘小学、初中或高中’,‘Street_Address’......
不知道我怎么才能解决这个问题.
我try 使用(")而不是(‘),或者使用%%SQL而不是%SQL
Here is an example screenshot from my data:
Here is an screenshot from command line with my query, and example query. I'm getting output with my query in command line. So my syntax working well on command line but not on jupyter notebook.