#!/usr/bin/python2.7
# -*- coding: UTF-8 -*-

import tushare as ts
import pandas as pd
from sqlalchemy import create_engine

df = ts.get_hist_data('600300').iloc[:,:4]
engine = create_engine('mysql://root:qweqwe@10.0.0.5/stock?charset=utf8')
df.to_sql('tick_data600300',engine,if_exists='append')
df1 = pd.read_sql('tick_data600300',engine)
print df1

相关文章:

  • 2021-08-12
  • 2022-12-23
  • 2022-01-21
  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
  • 2021-12-22
  • 2023-01-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-10-06
  • 2022-12-23
相关资源
相似解决方案