_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › py-蠏覿

import pandas.io.sql as sql
import pyodbc
conn = pyodbc.connect(driver='{SQL Server}', host='192.168.201.100,1433', database='test', user='id', password='pass')

begin_dt = "'20150501'"
end_dt = "'20150516'"
sql_string = '''
   select x, y 
   from tbl_a
   and regdate >= %s and regdate < %s
''' % (begin_dt, end_dt)

result = sql.read_sql(sql_string, conn)
print result

slope, intercept, r_value, p_value, stderr = stats.linregress(result.amt, result.dau)
print slope, intercept, r_value, p_value, stderr
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:52

襦 蟆れ 覲企 蟆襷 譴 蟆 . (覯襦)