cudf-analytics

द्वारा langchain-ai

GPU-त्वरित डेटा विश्लेषण के लिए डेटासेट, CSV या सारणीबद्ध डेटा पर NVIDIA cuDF का उपयोग करें। तब ट्रिगर होता है जब कार्यों में groupby एकत्रीकरण, सांख्यिकीय... शामिल हों।

npx skills add https://github.com/langchain-ai/deepagents --skill cudf-analytics

cuDF Analytics Skill

GPU-accelerated data analysis using NVIDIA RAPIDS cuDF. cuDF provides a pandas-like API that runs on NVIDIA GPUs, enabling massive speedups on large datasets.

When to Use This Skill

Use this skill when:

  • Analyzing CSV files, datasets, or tabular data
  • Computing statistical summaries (mean, median, std, quartiles)
  • Performing groupby aggregations
  • Detecting anomalies or outliers in data
  • Profiling datasets with millions of rows
  • Computing correlation matrices

Initialization (REQUIRED)

Always start every script with this boilerplate. It tests actual GPU operations, not just import.

import pandas as pd

try:
    import cudf
    # Smoke-test: verify GPU compute AND host transfer both work
    _test = cudf.Series([1, 2, 3])
    assert _test.sum() == 6
    assert _test.to_pandas().tolist() == [1, 2, 3]
    GPU = True
except Exception as e:
    print(f"[GPU] cudf unavailable, falling back to pandas: {e}")
    GPU = False

def read_csv(path):
    return cudf.read_csv(path) if GPU else pd.read_csv(path)

def to_pd(df):
    """Convert cuDF DataFrame/Series to pandas. Use this instead of .to_pandas() directly."""
    if not GPU:
        return df
    try:
        return df.to_pandas()
    except Exception as e:
        print(f"[GPU] .to_pandas() failed, using Arrow fallback: {e}")
        return df.to_arrow().to_pandas()

Quick Reference

cuDF mirrors the pandas API. Common operations:

Read Data

df = read_csv("data.csv")

Statistical Summary

# Use to_pd() when you need pandas output
summary = to_pd(df[["value", "score"]].describe())

# Scalar values work directly with float()
mean_val = float(df["value"].mean())
q1 = float(df["value"].quantile(0.25))

# Correlation
corr = float(df["value"].corr(df["score"]))

Groupby Aggregation

result = df.groupby("category").agg({
    "revenue": ["sum", "mean", "count"],
    "quantity": ["sum", "mean"],
})
result_pd = to_pd(result)

Anomaly Detection (IQR Method)

col = "value"
Q1 = float(df[col].quantile(0.25))
Q3 = float(df[col].quantile(0.75))
IQR = Q3 - Q1
lower = Q1 - 1.5 * IQR
upper = Q3 + 1.5 * IQR
outliers = to_pd(df[(df[col] < lower) | (df[col] > upper)])

Anomaly Detection (Z-Score Method)

mean = float(df[col].mean())
std = float(df[col].std())
df["z_score"] = (df[col] - mean) / std
anomalies = to_pd(df[df["z_score"].abs() > 3])

Filtering and Selection

# Filter rows
filtered = df[df["status"] == "active"]

# Select columns
subset = df[["name", "revenue", "date"]]

# Sort
sorted_df = df.sort_values("revenue", ascending=False)

# Convert to pandas for final output / iteration
result_pd = to_pd(sorted_df)

Data Type Requirements

cuDF requires explicit type specification for optimal performance:

  • Use float32 or float64 for numeric data
  • Use int32 or int64 for integer data
  • String columns use cuDF's string dtype automatically

Output Guidelines

When reporting analysis results:

  • Include dataset dimensions (rows x columns)
  • Show key statistics in formatted tables
  • Highlight notable patterns, trends, or anomalies
  • Provide both summary statistics and specific examples
  • Note any data quality issues (missing values, outliers)

langchain-ai की और Skills

deepagents-thread-inspector
langchain-ai
स्थानीय Deep Agents Code SQLite सत्र भंडार में वार्तालापों का निरीक्षण और व्याख्या करें। LangSmith ट्रेस टूलिंग अनुपलब्ध होने पर फ़ॉलबैक के रूप में उपयोग करें, इसके लिए…
deepagents-python-quickstart
langchain-ai
आधिकारिक क्विकस्टार्ट का पालन करके पायथन में एक न्यूनतम स्थानीय डीप एजेंट तैयार करें, टैविली के बजाय प्रदाता-मूल वेब खोज का उपयोग करें। उपयोग करें जब उपयोगकर्ता चाहता है…
deepagents-typescript-quickstart
langchain-ai
आधिकारिक क्विकस्टार्ट का पालन करके TypeScript में एक न्यूनतम स्थानीय Deep Agent तैयार करें, Tavily के बजाय प्रोवाइडर-नेटिव वेब खोज का उपयोग करें। उपयोग करें जब उपयोगकर्ता…
eval-engineering
langchain-ai
किसी एजेंट रिपॉजिटरी और वैकल्पिक उपयोगकर्ता-प्रदत्त ट्रेस का पुनरावृत्त रूप से निरीक्षण करें, उपयोगकर्ता का साक्षात्कार लें, और एक-एक करके Harbor मूल्यांकन बनाएं, चलाएं, और ऑडिट करें। इसके लिए उपयोग करें…
LangChain RAG Pipeline
langchain-ai
इस कौशल का उपयोग किसी भी पुनर्प्राप्ति-संवर्धित पीढ़ी (RAG) प्रणाली के निर्माण में करें। इसमें दस्तावेज़ लोडर, RecursiveCharacterTextSplitter, एम्बेडिंग (OpenAI),… शामिल हैं।
LangChain Structured Output & HITL
langchain-ai
langchain-structured-output-&-hitl — AI एजेंटों के लिए एक इंस्टॉल करने योग्य कौशल, जो langchain-ai/langchain-skills द्वारा प्रकाशित है।
LangSmith Datasets
langchain-ai
इस कौशल का उपयोग करें जब ट्रेस से मूल्यांकन डेटासेट बनाना हो या LangSmith पर डेटासेट अपलोड करना हो या डेटासेट क्वेरी करना हो। इसमें डेटासेट प्रकार शामिल हैं (final_response,…
langsmith-evaluator
langchain-ai
लैंगस्मिथ के लिए मूल्यांकन पाइपलाइन बनाते समय इस कौशल का आह्वान करें। इसमें तीन मुख्य घटक शामिल हैं: (1) मूल्यांकनकर्ता बनाना - LLM-एक-न्यायाधीश, कस्टम कोड; (2)…