59a4736028fea991396643e361d0488c7c96736d,nilmtk/elecmeter.py,ElecMeter,power_series,#ElecMeter#,297
Before Change
series = chunk.icol(0).dropna()
series.timeframe = getattr(chunk, "timeframe", None)
series.look_ahead = getattr(chunk, "look_ahead", None)
yield series
def dry_run_metadata(self):
return self.metadata
After Change
if kwargs.has_key("cols"):
raise ValueError("Cannot specify `load_all_power_columns` and"
" `cols` together.")
if kwargs.has_key("cols") and measurement_ac_type_prefs:
raise ValueError("Cannot specify `cols` and"
" `measurement_ac_type_prefs` together.")
// Select power column:
if load_all_power_columns:
kwargs["cols"] = [("power", ac_type) for ac_type in AC_TYPES]
elif measurement_ac_type_prefs:
best_ac_type = select_best_ac_type(self.available_power_ac_types(),
measurement_ac_type_prefs)
kwargs["cols"] = [("power", best_ac_type)]
// Get source node
last_node = self.get_source_node(**kwargs)
generator = last_node.generator
// Connect together all preprocessing nodes
for node in preprocessing:
node.upstream = last_node
last_node = node
generator = last_node.process()
// Pull data through preprocessing pipeline
for chunk in generator:
if len(chunk.columns) == 1:
chunk_to_yield = chunk.icol(0).dropna()
chunk_to_yield.timeframe = getattr(chunk, "timeframe", None)
chunk_to_yield.look_ahead = getattr(chunk, "look_ahead", None)
else:
chunk_to_yield = chunk
yield chunk_to_yield
def dry_run_metadata(self):
return self.metadata
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: nilmtk/nilmtk
Commit Name: 59a4736028fea991396643e361d0488c7c96736d
Time: 2014-12-02
Author: jack-list@xlk.org.uk
File Name: nilmtk/elecmeter.py
Class Name: ElecMeter
Method Name: power_series
Project Name: deepmipt/DeepPavlov
Commit Name: 3b3f8bd00c463e441600673141ff2de608880c9a
Time: 2018-02-05
Author: yoptar@gmail.com
File Name: deeppavlov/datasets/dialog_dataset.py
Class Name: DialogDataset
Method Name: batch_generator
Project Name: pantsbuild/pants
Commit Name: 6a5d77c31e772cec5fedbf149f3d41108c5aae8c
Time: 2018-05-16
Author: dawagner@gmail.com
File Name: tests/python/pants_test/engine/test_isolated_process.py
Class Name:
Method Name: javac_compile_process_result
Project Name: pantsbuild/pants
Commit Name: e77a650432097e3eeb867dfe4fec5235450414bf
Time: 2016-03-06
Author: cheister@gmail.com
File Name: src/python/pants/backend/graph_info/tasks/list_owners.py
Class Name: ListOwners
Method Name: console_output