a3b39f9e6e7e1b33a3eb9919923d939430b60b86,QUANTAXIS/QAFetch/QATdx.py,,QA_fetch_get_stock_latest,#Any#Any#Any#,157
Before Change
with api.connect(ip, port):
data = pd.DataFrame()
for item in code:
market_code = __select_market_code(item)
__data = api.to_df(api.get_security_bars(
9, market_code, item, 0, 1))
__data["code"] = item
data = data.append(__data)
data["date"] = data["datetime"].apply(lambda x: x[0:10])
data["date_stamp"] = data["date"].apply(
lambda x: QA_util_date_stamp(x))
data["date"] = pd.to_datetime(data["date"])
data.set_index("date", drop=False, inplace=True)
data["date"] = data["date"].apply(lambda x: str(x)[0:10])
return data.drop(["year", "month", "day", "hour",
After Change
code = [code] if isinstance(code, str) else code
api = TdxHq_API(multithread=True)
with api.connect(ip, port):
data = pd.concat([api.to_df(api.get_security_bars(
9, __select_market_code(item), item, 0, 1)).assign(code=item) for item in code], axis=0)
return data\
.assign(date=pd.to_datetime(data["datetime"]
.apply(lambda x: x[0:10])), date_stamp=data["datetime"]
.apply(lambda x: QA_util_date_stamp(str(x[0:10]))))\
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: QUANTAXIS/QUANTAXIS
Commit Name: a3b39f9e6e7e1b33a3eb9919923d939430b60b86
Time: 2017-09-01
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAFetch/QATdx.py
Class Name:
Method Name: QA_fetch_get_stock_latest
Project Name: daavoo/pyntcloud
Commit Name: b6106d3044f7800af8710cbdc998ed78f7e6588c
Time: 2016-11-30
Author: daviddelaiglesiacastro@gmail.com
File Name: pyntcloud/structures/octree.py
Class Name: Octree
Method Name: get_level_as_sf
Project Name: nilmtk/nilmtk
Commit Name: 4a0e05246b57d6aaa4369c4a07e5cd81314c5ba2
Time: 2014-12-18
Author: nipunreddevil@gmail.com
File Name: nilmtk/feature_detectors/cluster.py
Class Name:
Method Name: hart85_means_shift_cluster