807f63ce2e2bf07b268458e4855a5d3b57b0e4d9,QUANTAXIS/QAFetch/QAQuery.py,,QA_fetch_quotations,#Any#Any#,382
Before Change
try:
collections = db.get_collection(
"realtime_{}".format(date))
return pd.DataFrame([item for item in collections.find(
{})]).drop(["_id"], axis=1).set_index("datetime", drop=False).sort_index()
except Exception as e:
raise e
After Change
try:
collections = db.get_collection(
"realtime_{}".format(date))
data = pd.DataFrame([item for item in collections.find(
{})]).drop(["_id"], axis=1)
return data.assign(date=data.datetime.apply(lambda x: str(x)[0:10])).assign(datetime=pd.to_datetime(data.datetime)).set_index("datetime", drop=False).sort_index()
except Exception as e:
raise e
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 807f63ce2e2bf07b268458e4855a5d3b57b0e4d9
Time: 2018-07-09
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAFetch/QAQuery.py
Class Name:
Method Name: QA_fetch_quotations
Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 807f63ce2e2bf07b268458e4855a5d3b57b0e4d9
Time: 2018-07-09
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAFetch/QAQuery.py
Class Name:
Method Name: QA_fetch_quotation
Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 261c81df171eef85417c7cf1aaefb2955a1f1a8f
Time: 2018-09-23
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAARP/QAAccount.py
Class Name: QA_Account
Method Name: daily_hold