class PercentileOfScore(object):

    def __init__(self, aList):
        self.a = np.array(aList)
self.a.sort()
self.n = float(len(self.a))
self.pct = self.__rank_searchsorted_list

def __rank_searchsorted_list(self, score_list):
    adx = np.searchsorted(self.a, score_list, side='right')
pct = []
for idx in adx:
    pct.append(float(idx) / self.n * 100.0)
return pct
vectorize percentile value of column B of column A (for groups)