89b43bbd55550d5c103a8b06281d9bc62e533680,QUANTAXIS/QAData/data_resample.py,,QA_data_min_resample,#Any#Any#,348
Before Change
"volume": "sum",
"amount": "sum"
}
resx = pd.DataFrame()
for item in set(min_data.index.date):
min_data_p = min_data.loc[str(item)]
n = min_data_p["{} 21:00:00".format(item):].resample(
type_,
base=30,
closed="right",
loffset=type_
).apply(CONVERSION)
d = min_data_p[:"{} 11:30:00".format(item)].resample(
type_,
base=30,
closed="right",
loffset=type_
).apply(CONVERSION)
f = min_data_p["{} 13:00:00".format(item):].resample(
type_,
closed="right",
loffset=type_
).apply(CONVERSION)
resx = resx.append(d).append(f)
return resx.dropna().reset_index().set_index(["datetime", "code"])
After Change
"volume": "sum",
"amount": "sum"
}
min_data = min_data.loc[:, list(CONVERSION.keys())]
idx = min_data.index
part_1 = min_data.iloc[idx.indexer_between_time("9:30", "11:30")]
part_1_res = part_1.resample(
type_,
base=30,
closed="right",
loffset=type_
).apply(CONVERSION)
part_2 = min_data.iloc[idx.indexer_between_time("13:00", "15:00")]
part_2_res = part_2.resample(
type_,
base=0,
closed="right",
loffset=type_
).agg(CONVERSION)
return pd.concat([part_1_res, part_2_res]).dropna().sort_index().reset_index().set_index(["datetime", "code"])
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 89b43bbd55550d5c103a8b06281d9bc62e533680
Time: 2019-08-05
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAData/data_resample.py
Class Name:
Method Name: QA_data_min_resample
Project Name: nilmtk/nilmtk
Commit Name: 72f3f5bf50ed2d91cdcfbe2cf47120a2df8883cd
Time: 2014-11-26
Author: jack-list@xlk.org.uk
File Name: nilmtk/elecmeter.py
Class Name: ElecMeter
Method Name: _get_stat_from_cache_or_compute
Project Name: catalyst-cooperative/pudl
Commit Name: 5aaa63d7ecf85d341fec9b758d17f2bf4cde6042
Time: 2020-03-11
Author: zane.selvans@catalyst.coop
File Name: src/pudl/transform/ferc1.py
Class Name: FERCPlantClassifier
Method Name: predict
Project Name: etal/cnvkit
Commit Name: e2ab4ccd6cb5e306c66182ac8ff1ad2d8183df1c
Time: 2016-10-07
Author: eric.talevich@gmail.com
File Name: cnvlib/gary.py
Class Name: GenomicArray
Method Name: _make_blank