Skip to content

Instantly share code, notes, and snippets.

@nipunbatra
Created June 13, 2019 10:34

Revisions

  1. nipunbatra created this gist Jun 13, 2019.
    7 changes: 7 additions & 0 deletions code.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    from nilmtk import DataSet
    ds = DataSet("/home/nipunbatra-pc/Downloads/iawe.h5")

    elec = ds.buildings[1].elec

    elec.meters[0].load(chunksize=10)
    next(elec.meters[0].load(chunksize=10))
    16 changes: 16 additions & 0 deletions out.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    In [21]: next(elec.meters[0].load(chunksize=10))
    Out[21]:
    physical_quantity power current power
    type reactive apparent active
    2013-05-24 05:30:00+05:30 6.000030e-18 6.000030e-18 0.0 0.0
    2013-05-24 05:30:01+05:30 6.000030e-18 6.000030e-18 0.0 0.0
    2013-05-24 05:30:02+05:30 6.000030e-18 6.000030e-18 0.0 0.0
    2013-05-24 05:30:03+05:30 6.000030e-18 6.000030e-18 0.0 0.0
    2013-05-24 05:30:04+05:30 6.000030e-18 6.000030e-18 0.0 0.0
    2013-05-24 05:30:05+05:30 6.000030e-18 6.000030e-18 0.0 0.0
    2013-05-24 05:30:06+05:30 6.000030e-18 6.000030e-18 0.0 0.0
    2013-05-24 05:30:07+05:30 6.000030e-18 6.000030e-18 0.0 0.0
    2013-05-24 05:30:08+05:30 6.000030e-18 6.000030e-18 0.0 0.0
    2013-05-24 05:30:09+05:30 6.000030e-18 6.000030e-18 0.0 0.0
    2013-05-24 05:30:10+05:30 6.000030e-18 6.000030e-18 0.0 0.0