import pandas as pd
import sqlite3
from pandas.io.sql import read_sql
conn = sqlite3.connect('my_database.db3')
data = read_sql('select * from my_table',conn)
The issue I am facing here is I can use this code in wing ide to read the table, while Anaconda spyder fails to execute the command:
the output error is :
DatabaseError: Execution failed on sql 'select * from my_table': no such table: my_table
Any ideas why?
EDIT:
run directly from sqlite3, giving following error:
File "<ipython-input-186-71ea29127489>", line 7, in <module>
data = conn.execute('select * from my_table;')
OperationalError: no such table: my_table