print ('Files in Drive:')
!ls drive/AI`
'database.sqlite'文件已存在于驱动器中。当我在Google Colab中运行上述代码时,我的驱动程序中显然存在我的sqlite文件。但是每当我对这个文件运行一些查询时,它说
# using the SQLite Table to read data.
con = sqlite3.connect('database.sqlite')
#filtering only positive and negative reviews i.e.
# not taking into consideration those reviews with Score=3
filtered_data = pd.read_sql_query("SELECT * FROM Reviews WHERE Score !=3",con)
DatabaseError:sql上的执行失败'SELECT * FROM评论WHERE得分!= 3':没有这样的表:评论
上传文件后,单击左侧的导航窗格。在“文件”选项卡下,右键单击上载的文件,然后选择“复制路径”。在连接中使用此复制的路径:
con = sqlite3.connect('content/database.sqlite')