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 Reviews WHERE Score != 3‘执行失败:没有这样的表: Reviews
发布于 2019-03-10 01:22:05
上传文件后,单击左侧的导航窗格。在文件标签下,右击你上传的文件并选择‘复制路径’。在连接中使用此复制的路径:
con = sqlite3.connect('content/database.sqlite') https://stackoverflow.com/questions/53762601
复制相似问题