

def tree2pandas(filename, treename, branches=None, start=None, stop=None, selection=None, clip=1e+33):
    import root_numpy
    data = root_numpy.root2array(filenames=filename, treename=treename, branches=branches, selection=selection, start=start, stop=stop)
    data = pandas.DataFrame(data)
    if (clip is not None):
        data = numpy.clip(data, (- clip), clip)
    return data

dataset/ETHPy150Open anaderi/lhcb_trigger_ml/hep_ml/rootutilities.py tree2pandas/original