def getDifference(currSourceData, currHoldSet, typ): currList = [] lastList = [] if len(currSourceData) != 0: for index, row in currSourceData.iterrows(): currList.append(index[1]) if len(currHoldSet) != 0: for innerCode in currHoldSet: lastList.append(innerCode) #currList - lastList if typ == 1: returnList = SetUtil.difference(currList, lastList) #lastList - currList else: returnList = SetUtil.difference(lastList, currList) return returnList
def getDifference(currSourceData, currHoldSet, typ): currList = [] lastList = [] if len(currSourceData) != 0: #for index, row in currSourceData.iterrows(): #currList.append(index[1]) currList = list(currSourceData.index.get_level_values(1)) if len(currHoldSet) != 0: #for innerCode in currHoldSet: #lastList.append(innerCode) lastList = list(currHoldSet.keys()) lastList.sort() #currList - lastList if typ == 1: returnList = SetUtil.difference(currList, lastList) #lastList - currList else: returnList = SetUtil.difference(lastList, currList) return returnList
def getDifference(currSourceData, lastSourceData): currList = [] lastList = [] if len(currSourceData) != 0: for index, row in currSourceData.iterrows(): currList.append(index[1]) if len(lastSourceData) != 0: for index, row in lastSourceData.iterrows(): lastList.append(index[1]) returnList = SetUtil.difference(currList, lastList) return returnList