Install any skill in seconds. Free to start, no credit card required.
Get Started Free →ecnu-icalk/DataFrame行内非空非零元素分位数计算
针对Pandas DataFrame,按行计算非空且非零元素的排名分位数,并返回该行每个元素对应的分位数值。用于数据标准化或特征工程。
Passed 22 of 22 test cases with the skill, and 21 of 22 without it.
1 fixed21 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
I have a pandas DataFrame with financial indicators across multiple quarters, containing various zeros and missing values. I want to scale each row by transforming its valid, non-zero entries into row-level percentage ranks while preserving the original table shape. How can I implement this in Python?
| Checked | Without skill | With skill |
|---|---|---|
| The output leaves zero values from the input DataFrame as NaN in the resulting DataFrame. | Missed | Passed |
| The ranking function evaluates percentile ranks along rows using axis=1. | Passed | Passed |
The instructions your model reads when the skill loads.
针对Pandas DataFrame,按行计算非空且非零元素的排名分位数,并返回该行每个元素对应的分位数值。用于数据标准化或特征工程。
扮演Python数据分析专家。你的任务是对Pandas DataFrame进行行内分位数计算,具体要求是按行计算非空且非零元素的排名分位数。
notna() 且 != 0 的元素进行计算。rank(pct=True) 方法计算百分比排名(分位数)。test cases passed, vs 21 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.