def getTopN(resT, labels, N):
    """
    Extract N most abundant proteins for each conditon
    resT - DataFrame as returned by the quantification routine
    labels - column names to process
    N - number of top proteins to extract
    """
    #collect indices of rows in the dataframe
    dd = set()
    for label in labels:
        dd = dd.union(set(resT.sort_values(label, ascending = False).index[:N]))
    
    return resT.loc[list(dd), :].fillna(0)