Skip to content

MichelRojo86WPP/copilot-config / skills/accelerated-computing-cudf

accelerated-computing-cudf

Verified

Official 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.

FileKindSize
BENCHMARK.mdmarkdown4.2 KB
SKILL.mdskill md9.2 KB
evals/evals.jsonconfig15.8 KB
evals/files/cudf-apply-udf/code/generate_data.pyscript1.5 KB
evals/files/cudf-apply-udf/code/udf_pipeline.pyscript5.3 KB
evals/files/cudf-csv-etl/code/etl_pipeline.pyscript2.6 KB
evals/files/cudf-csv-etl/code/generate_data.pyscript1.2 KB
evals/files/cudf-groupby-agg/code/generate_data.pyscript1.4 KB
evals/files/cudf-groupby-agg/code/groupby_analysis.pyscript4.3 KB
evals/files/cudf-multi-join/code/generate_data.pyscript2.0 KB
evals/files/cudf-multi-join/code/multi_join.pyscript3.6 KB
evals/files/cudf-native-stream-handoff-boundary/NOTICE.mdmarkdown344 B
evals/files/cudf-native-stream-handoff-boundary/code/run_smoke.shscript464 B
evals/files/cudf-native-stream-handoff-boundary/code/threaded_handoff.cuother3.9 KB
evals/files/cudf-null-handling/code/generate_data.pyscript2.1 KB
evals/files/cudf-null-handling/code/null_pipeline.pyscript4.7 KB
evals/files/cudf-parquet-io/code/generate_data.pyscript2.0 KB
evals/files/cudf-parquet-io/code/parquet_pipeline.pyscript4.3 KB
evals/files/cudf-pivot-melt/code/generate_data.pyscript1.4 KB
evals/files/cudf-pivot-melt/code/reshape_analysis.pyscript4.6 KB
evals/files/cudf-string-ops/code/clean_contacts.pyscript3.4 KB
evals/files/cudf-string-ops/code/generate_data.pyscript2.7 KB
evals/files/cudf-timeseries-resample/code/generate_data.pyscript1.5 KB
evals/files/cudf-timeseries-resample/code/timeseries_analysis.pyscript4.1 KB
evals/files/cudf-window-functions/code/generate_data.pyscript1.4 KB
evals/files/cudf-window-functions/code/window_analysis.pyscript5.1 KB
evals/files/negative-deep-learning-training/code/train.pyscript1.4 KB
evals/files/source-cudf-null-fillna-semantics/NOTICE.mdmarkdown342 B
evals/files/source-cudf-null-fillna-semantics/code/null_cleanup.pyscript1.4 KB
references/api-patterns.mdmarkdown6.9 KB
references/cudf-pandas-accelerator.mdmarkdown3.6 KB
references/dask-cudf-patterns.mdmarkdown7.0 KB
skill-card.mdmarkdown4.0 KB
skill.oms.sigother12.2 KB

evals/files/cudf-csv-etl/code/etl_pipeline.py

View on GitHub
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

"""CSV ETL pipeline: read, filter, compute, groupby, write parquet.

Reads sales.csv, filters to completed orders, adds computed columns
(revenue, discounted_revenue, age_group), runs a groupby aggregation
by region and product, and writes the summary to parquet.
"""

import numpy as np
import pandas as pd

from generate_data import generate


def load_data():
    generate()
    df = pd.read_csv("sales.csv")
    print(f"Loaded {len(df)} rows from sales.csv")
    return df


def filter_completed(df):
    """Keep only completed orders with quantity >= 2."""
    mask = (df["status"] == "completed") & (df["quantity"] >= 2)
    filtered = df[mask].copy()
    print(f"Filtered to {len(filtered)} completed orders")
    return filtered


def add_computed_columns(df):
    """Add revenue, discounted revenue, and age group columns."""
    df["revenue"] = df["quantity"] * df["unit_price"]
    df["discounted_revenue"] = df["revenue"] * (1 - df["discount_pct"])

    bins = [0, 25, 35, 50, 65, 100]
    labels = ["18-25", "26-35", "36-50", "51-65", "65+"]
    df["age_group"] = pd.cut(df["customer_age"], bins=bins, labels=labels)

    df["high_value"] = (df["discounted_revenue"] > 500).astype(int)
    print(f"Added computed columns; {df['high_value'].sum()} high-value orders")
    return df


def aggregate_by_region_product(df):
    """Groupby region + product, compute summary statistics."""
    summary = (
        df.groupby(["region", "product"])
        .agg(
            total_revenue=("revenue", "sum"),
            total_discounted=("discounted_revenue", "sum"),
            order_count=("order_id", "count"),
            avg_quantity=("quantity", "mean"),
            avg_unit_price=("unit_price", "mean"),
            high_value_count=("high_value", "sum"),
        )
        .reset_index()
    )
    summary["avg_discount_impact"] = (
        1 - summary["total_discounted"] / summary["total_revenue"]
    )
    summary = summary.sort_values("total_revenue", ascending=False)
    print(f"Aggregated into {len(summary)} region-product groups")
    return summary


def write_output(summary):
    """Write the summary to a parquet file."""
    summary.to_parquet("sales_summary.parquet", index=False)
    print("Wrote sales_summary.parquet")


def main():
    df = load_data()
    df = filter_completed(df)
    df = add_computed_columns(df)
    summary = aggregate_by_region_product(df)
    write_output(summary)

    print("\nTop 5 region-product combos by revenue:")
    print(summary.head(5).to_string(index=False))


if __name__ == "__main__":
    main()
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: 119kUpdated Claude CodeCodexVerifiedInstall
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: 119kUpdated Claude CodeCodexVerifiedInstall
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: 118kUpdated Claude CodeCodexVerifiedInstall
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: 118kUpdated Claude CodeCodexVerifiedInstall