807f63ce2e2bf07b268458e4855a5d3b57b0e4d9,QUANTAXIS/QAFetch/QAQuery.py,,QA_fetch_quotation,#Any#Any#Any#,371

Before Change


    try:
        collections = db.get_collection(
            "realtime_{}".format(date))
        return pd.DataFrame([item for item in collections.find(
            {"code": code})]).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(
            {"code": code})]).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

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

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_quotation


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: WZBSocialScienceCenter/tmtoolkit
Commit Name: 9def69a805132ff7549744b5b30a2fa7531fa405
Time: 2019-06-12
Author: markus.konrad@wzb.eu
File Name: tmtoolkit/preprocess/_tmpreproc.py
Class Name: TMPreproc
Method Name: get_kwic


Project Name: WZBSocialScienceCenter/tmtoolkit
Commit Name: 9def69a805132ff7549744b5b30a2fa7531fa405
Time: 2019-06-12
Author: markus.konrad@wzb.eu
File Name: tmtoolkit/preprocess/_tmpreproc.py
Class Name: TMPreproc
Method Name: get_kwic_table