Hi UB,
I am having EOD database in mysql so instead of loading files through pandas can i use Rapid API to load data from mysqldatabase.If 'Yes',kindly can you tell me which class or function i should be using to achieve this.
I am having EOD database in mysql so instead of loading files through pandas can i use Rapid API to load data from mysqldatabase.If 'Yes',kindly can you tell me which class or function i should be using to achieve this.
Python:
from sqlalchemy import create_engine
engine = create_engine('sqlite:///data.db')
backtest(connection=engine, tablename='data')
Python:
# pyodbc
engine = create_engine('mssql+pyodbc://scott:tiger@mydsn')
# pymssql
engine = create_engine('mssql+pymssql://scott:tiger@hostname:port/dbname')
Python:
engine = create_engine('mysql://scott:tiger@localhost/foo')
Doing this would load the entire table into memory and it expects timestamp and symbol columns in the database.
A better way would be to use the pd.read_sql_query function.
Last edited: