I want to replicate the following SAS code in Python.
PROC RANK DATA=TEMP1 OUT=TEMP2 GROUPS=10000 TIES=LOW; BY LEVEL POPULATION; VAR VAL_INPUT; RANKS RANK_SCORE;