Returns the percentile of a value. Returns the same values as the Excel PERCENTRANK and PERCENTRANK.INC functions.
pip install percentile_rank
from percentile_rank import percent_rank
percent_rank([1, 5, 20, 50, 55, 60, 70, 80, 90, 100], 44)
Initially based on the answer provided by xlecoustillier On Stack Overflow: https://stackoverflow.com/questions/17919263/what-is-the-excel-percentrank-algorithm-in-c