I have a Pandas DataFrame with 600 rows and 100 columns. I currently use this code to calculate rank in pandas: df[rankCols].transform('rank', pct=True) But I want to calculate it in numpy to improve speed. As I later convert my DataFrame to numpy array. How to calculate the same in numpy? I can rank using argsort() but it does not calculate percentile rank. Continue reading...