import numpy as np
import pandas as pd
from sqlalchemy import create_engine
mysql_config = {'host': '59.78.102.118',
'port': 23208,
'user': 'student',
'password': 'Python_123456',
'dbname': 'research'}
mysql_engine = create_engine('mysql+pymysql://student:Python_123456@59.78.102.118:23208/research'.format(**mysql_config), pool_pre_ping=True)
sql = "select Date,Close from stock trading date where Date >= '2005-01-01' AND Date <= '2018-12-31' AND Stkcd = '000041'"
pd_data = pd.read_sql(sql,mysql_engine)
print(pd_data)