MichelRojo86WPP/copilot-config / skills/accelerated-computing-cudf
accelerated-computing-cudf
VerifiedOfficial NVIDIA-authored guidance for NVIDIA cuDF GPU DataFrames, pandas acceleration, dask-cuDF, ETL, joins, groupby, CSV/Parquet I/O, nullable semantics, and multi-GPU DataFrame workloads.
evals/files/source-cudf-null-fillna-semantics/code/null_cleanup.py
View on GitHub# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
"""Pandas nullable-value cleanup pipeline."""
from __future__ import annotations
import numpy as np
import pandas as pd
def build_frame() -> pd.DataFrame:
return pd.DataFrame(
{
"account": pd.Series([1, 2, None, 4, 5, None], dtype="Int64"),
"region": pd.Series(["west", None, "east", "west", None, "east"], dtype="string"),
"score": [0.8, np.nan, 0.3, 0.9, np.nan, 0.2],
"tier": pd.Series(["gold", "silver", None, "gold", "bronze", None], dtype="string"),
}
)
def clean(frame: pd.DataFrame) -> pd.DataFrame:
result = frame.copy()
result["region"] = result["region"].fillna("unknown")
result["tier"] = result["tier"].fillna("unassigned")
result["score"] = result["score"].where(result["score"].notna(), result["score"].median())
result["high_score"] = result["score"] >= 0.75
grouped = (
result.groupby("region", dropna=False)
.agg(
accounts=("account", "count"),
avg_score=("score", "mean"),
high_count=("high_score", "sum"),
)
.reset_index()
.sort_values("region")
)
return grouped
def main() -> None:
print(clean(build_frame()).to_string(index=False))
if __name__ == "__main__":
main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |