def Segment(oData, cond):
    if (type(cond) is list):
        oDataSeg = []
        for c in cond:
            seg = Segment(oData, c)
            oDataSeg.append(seg)
        return oDataSeg
    condName = cond[0]
    condRange = cond[1]
    if (len(cond) > 2):
        condDesc = cond[2]
    else:
        condDesc = ''
    iCond = ((oData[condName] >= condRange[0]) & (oData[condName] <= condRange[1]))
    oDataSeg = copy.deepcopy(SliceDict(oData, iCond))
    oDataSeg['Desc'] = condDesc
    return oDataSeg
def Segment(oData, cond):
    if (type(cond) is list):
        oDataSeg = []
        for c in cond:
            seg = Segment(oData, c)
            oDataSeg.append(seg)
        return oDataSeg
    condName = cond[0]
    condRange = cond[1]
    if (len(cond) > 2):
        condDesc = cond[2]
    else:
        condDesc = 
    iCond = ((oData[condName] >= condRange[0]) & (oData[condName] <= condRange[1]))
    oDataSeg = copy.deepcopy(SliceDict(oData, iCond))
    oDataSeg['Desc'] = condDesc
    return oDataSeg