5eeca7d385178092790e08c1d5ad6cbcff35d3dc,nilmtk/metergroup.py,MeterGroup,load,#MeterGroup#,518
Before Change
chunk = chunk_from_next_meter
timeframe = chunk.timeframe
elif len(chunk_from_next_meter) > 0:
n = len(chunk)
timeframe = timeframe.intersect(chunk_from_next_meter.timeframe)
chunk += chunk_from_next_meter
chunk = chunk.dropna()
if len(chunk) < n:
After Change
// Update columns_to_average_counter
physical_quantities = chunk_from_next_meter.columns.get_level_values("physical_quantity")
columns_to_average = (set(PHYSICAL_QUANTITIES_TO_AVERAGE)
.intersection(physical_quantities))
counter_increment = pd.DataFrame(1, columns=columns_to_average,
index=chunk_from_next_meter.index)
columns_to_average_counter = columns_to_average_counter.add(
counter_increment, fill_value=0)
if chunk.empty:
break
// Divide any columns which need dividing to create mean values
for column in columns_to_average_counter:
chunk[column] /= columns_to_average_counter[column]
chunk.timeframe = timeframe
yield chunk
def plot_when_on(self, **load_kwargs):
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 4
Instances
Project Name: nilmtk/nilmtk
Commit Name: 5eeca7d385178092790e08c1d5ad6cbcff35d3dc
Time: 2014-12-11
Author: jack-list@xlk.org.uk
File Name: nilmtk/metergroup.py
Class Name: MeterGroup
Method Name: load
Project Name: nilmtk/nilmtk
Commit Name: ff5e5677fc969ccee18b0d1f537e96aff0ab8e0c
Time: 2018-06-26
Author: 10246101+PMeira@users.noreply.github.com
File Name: nilmtk/disaggregate/hart_85.py
Class Name: PairBuffer
Method Name: pair_transitions
Project Name: alexandrebarachant/muse-lsl
Commit Name: 1ec0207376e3dcece97812f8ae40bc8d7ec9b208
Time: 2017-11-10
Author: hubert@interaxon.ca
File Name: stimulus_presentation/generate_spatial_gratings.py
Class Name:
Method Name:
Project Name: deeptools/HiCExplorer
Commit Name: ae99b536ff30a731a1ae226e124867534a715bd4
Time: 2018-04-24
Author: 26085589+gtrichard@users.noreply.github.com
File Name: hicexplorer/hicPlotDistVsCounts.py
Class Name:
Method Name: main
Project Name: cesium-ml/cesium
Commit Name: a48399dd824b40c3ac5b8d8fa838e14cc87e661e
Time: 2017-03-29
Author: brettnaul@gmail.com
File Name: cesium/featurize.py
Class Name:
Method Name: load_featureset