import pickle
import pandas as pd

def draw_graph(pickle_name):
    with open(f"output/{pickle_name}.pickle", "rb") as f:
        df = pickle.load(f)
    currs = df
    currs.plot()
    mask = currs > 0.01
    active = currs[mask]
    secs = len(active) / 1000
    print(f"time: {secs} s")