Rank / Computation Layer
Calculate rankings for values in a column with sophisticated tie-handling methods. Similar to pandas.rank(), R's rank(), or SQL's RANK functions. Converts values to their relative positions with multiple options for handling ties.
Common applications:
- Sports and competition rankings
- Academic grading and class ranking
- Statistical analysis (rank correlation)
- Financial analysis (performance ranking)
- Market position analysis
- Employee performance evaluation
- Customer segmentation
- Feature importance ranking
Note: Null values are assigned null ranks. Rankings start from 1 (not 0-based).
Select
columnThe column to compute rankings for. Common input types:
- Numeric scores (test scores, ratings)
- Performance metrics (sales figures, KPIs)
- Temporal data (timestamps, durations)
- Measurement data (scientific readings) Any sortable data type is supported.
Method
enumMethods for handling tied values in ranking calculations. Different methods are suitable for different analytical needs and tie-breaking requirements.
Assign the mean rank to tied values. Example:
- Data: [10, 20, 20, 30]
- Ranks: [1, 2.5, 2.5, 4]
Best for statistical analysis and fair ranking systems.
Assign the lowest possible rank to tied values (competition ranking). Example:
- Data: [10, 20, 20, 30]
- Ranks: [1, 2, 2, 4]
Ideal for competition scenarios where ties share the higher position.
Assign the highest possible rank to tied values. Example:
- Data: [10, 20, 20, 30]
- Ranks: [1, 3, 3, 4]
Useful for conservative ranking where ties share the lower position.
Like 'Min' but with no rank gaps after ties. Example:
- Data: [10, 20, 20, 30]
- Ranks: [1, 2, 2, 3]
Suitable for compact ranking systems where rank gaps are undesirable.
Assign unique ranks based on occurrence order. Example:
- Data: [10, 20, 20, 30]
- Ranks: [1, 2, 3, 4]
Best when unique ranks are required and order matters.
Randomly assign ranks to tied values. Example:
- Data: [10, 20, 20, 30]
- Possible Ranks: [1, 2, 3, 4] or [1, 3, 2, 4]
Useful for tie-breaking in simulations or when unbiased random ordering is needed.
Descending
boolWhen true
, assigns rank 1 to the highest value (like competition rankings).
When false
, assigns rank 1 to the lowest value (like percentile rankings).
Common uses:
- True for 'best is highest' scenarios (sports rankings)
- False for 'best is lowest' scenarios (golf scores, time trials)
Seed
u64Random seed for the Random ranking method. Ensures reproducible results when using random tie-breaking. Ignored for other ranking methods. Same seed produces identical random rankings across runs.
AsColumn
nameName for the new column. If not provided, the system generates a unique name. If AsColumn
matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.