Introduction
The rank() method helps us find the position of values in a list or column, like giving scores a place in a race.
When you want to know the order of students based on their test scores.
When you need to rank products by sales to find the best sellers.
When comparing athletes' times to see who came first, second, etc.
When sorting data but want to keep the original order and just add ranks.
When handling ties and deciding how to assign ranks to equal values.