pandasdataanalysis

掌握使用 Pandas、NumPy 和 Matplotlib 进行数据操作、分析与可视化的技能。

仓库最近推送
GitHub Stars
7,029
Forks
634
Issues / PRs
0

预览截图

来自skillπ 实验室的展示

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "pandasdataanalysis":https://skillpi.com/zh/skills/deepskill-3733f4244297b14420b72c2222bf0e45fe9aad6280f52c2255e6c37c3bd817c4。安装前核对上游来源和版本:https://github.com/midudev/autoskills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

掌握使用 Pandas、NumPy 和 Matplotlib 进行数据操作、分析与可视化的技能。

0 下载

介绍来源: third_party · midudev · 2.1.0 参考来源

SkillPi 解读

能完成的任务
与熊猫、NumPy和Matplotlib进行数据操纵、分析和可视化
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: Pandas Data Analysis
description: Master data manipulation, analysis, and visualization with Pandas, NumPy, and Matplotlib
version: "2.1.0"
sasmp_version: "1.3.0"
bonded_agent: 03-data-science
bond_type: PRIMARY_BOND

# Skill Configuration
retry_strategy: exponential_backoff
observability:
  logging: true
  metrics: data_processing_time

Pandas Data Analysis

Overview

Master data analysis with Pandas, the powerful Python library for data manipulation and analysis. Learn to clean, transform, analyze, and visualize data effectively.

Learning Objectives

  • Load and manipulate data from various sources (CSV, Excel, SQL, APIs)
  • Clean and transform messy datasets
  • Perform exploratory data analysis (EDA)
  • Aggregate and group data for insights
  • Create compelling visualizations
  • Optimize performance for large datasets

Core Topics

1. Pandas DataFrames & Series

  • Creating DataFrames from various sources
  • Indexing and selecting data (loc, iloc, at, iat)
  • Filtering and boolean indexing
  • Adding/removing columns and rows
  • Data types and conversions

Code Example:

import pandas as pd
import numpy as np

# Create DataFrame
data = {
    'name': ['Alice', 'Bob', 'Charlie', 'David'],
    'age': [25, 30, 35, 28],
    'salary': [50000, 60000, 75000, 55000],
    'department': ['IT', 'HR', 'IT', 'Sales']
}
df = pd.DataFrame(data)

# Indexing and filtering
it_employees = df[df['department'] == 'IT']
high_earners = df.loc[df['salary'] > 55000, ['name', 'salary']]

# Adding calculated columns
df['annual_bonus'] = df['salary'] * 0.10
df['age_group'] = pd.cut(df['age'], bins=[0, 30, 40, 100], labels=['Young', 'Mid', 'Senior'])

print(df)

2. Data Cleaning & Transformation

  • Handling missing data (dropna, fillna, interpolate)
  • Removing duplicates
  • String operations and text cleaning
  • Date/time parsing and manipulation
  • Type conversions and casting
  • Applying custom functions (apply, map, applymap)

Code Example:

import pandas as pd

# Load data with missing values
df = pd.read_csv('sales_data.csv')

# Handle missing values
df['price'].fillna(df['price'].median(), inplace=True)
df['category'].fillna('Unknown', inplace=True)
df.dropna(subset=['customer_id'], inplace=True)

# Clean text data
df['product_name'] = df['product_name'].str.strip().str.lower()
df['product_name'] = df['product_name'].str.replace('[^a-zA-Z0-9 ]', '', regex=True)

# Convert dates
df['order_date'] = pd.to_datetime(df['order_date'])
df['year'] = df['order_date'].dt.year
df['month'] = df['order_date'].dt.month

# Remove duplicates
df.drop_duplicates(subset=['order_id'], keep='first', inplace=True)

# Apply custom function
def categorize_price(price):
    if price < 50:
        return 'Low'
    elif price < 100:
        return 'Medium'
    else:
        return 'High'

df['price_category'] = df['price'].apply(categorize_price)

3. Aggregation & Grouping

  • GroupBy operations
  • Aggregation functions (sum, mean, count, etc.)
  • Pivot tables and cross-tabulation
  • Multi-level indexing
  • Window functions (rolling, expanding)

Code Example:

import pandas as pd

# Sample sales data
df = pd.read_csv('sales.csv')

# GroupBy aggregation
dept_stats = df.groupby('department').agg({
    'salary': ['mean', 'min', 'max'],
    'employee_id': 'count'
})

# Multiple groupby
sales_by_region_product = df.groupby(['region', 'product_category'])['sales'].sum()

# Pivot table
pivot = df.pivot_table(
    values='sales',
    index='product_category',
    columns='quarter',
    aggfunc='sum',
    fill_value=0
)

# Rolling window (moving average)
df['sales_ma_7d'] = df.groupby('product_id')['sales'].transform(
    lambda x: x.rolling(window=7, min_periods=1).mean()
)

# Cumulative sum
df['cumulative_sales'] = df.groupby('product_id')['sales'].cumsum()

4. Data Visualization

  • Matplotlib basics
  • Seaborn for statistical plots
  • Pandas built-in plotting
  • Customizing plots
  • Creating dashboards

Code Example:

import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

# Set style
sns.set_style('whitegrid')

# Load data
df = pd.read_csv('sales_data.csv')

# 1. Line plot - Sales trend over time
df.groupby('month')['sales'].sum().plot(kind='line', figsize=(10, 6))
plt.title('Monthly Sales Trend')
plt.xlabel('Month')
plt.ylabel('Total Sales ($)')
plt.show()

# 2. Bar plot - Sales by category
category_sales = df.groupby('category')['sales'].sum().sort_values(ascending=False)
category_sales.plot(kind='bar', figsize=(10, 6))
plt.title('Sales by Category')
plt.xlabel('Category')
plt.ylabel('Total Sales ($)')
plt.xticks(rotation=45)
plt.show()

# 3. Histogram - Price distribution
df['price'].hist(bins=30, figsize=(10, 6))
plt.title('Price Distribution')
plt.xlabel('Price ($)')
plt.ylabel('Frequency')
plt.show()

# 4. Box plot - Salary by department
df.boxplot(column='salary', by='department', figsize=(10, 6))
plt.title('Salary Distribution by Department')
plt.suptitle('')
plt.show()

# 5. Heatmap - Correlation matrix
corr = df[['age', 'salary', 'years_experience']].corr()
sns.heatmap(corr, annot=True, cmap='coolwarm', center=0)
plt.title('Correlation Matrix')
plt.show()

Hands-On Practice

Project 1: Customer Analytics

Analyze customer purchase behavior and segmentation.

Requirements:

  • Load customer transaction data
  • Clean and prepare dataset
  • Calculate RFM (Recency, Frequency, Monetary) metrics
  • Customer segmentation
  • Visualize insights
  • Generate executive summary

Key Skills: Data cleaning, aggregation, visualization

Project 2: Time Series Analysis

Analyze sales trends and forecast future performance.

Requirements:

  • Load time series data
  • Handle missing dates
  • Calculate moving averages
  • Identify trends and seasonality
  • Detect anomalies
  • Create interactive visualizations

Key Skills: Time series operations, rolling windows, plotting

Project 3: Data Quality Report

Build automated data quality assessment tool.

Requirements:

  • Check for missing values
  • Identify duplicates
  • Detect outliers
  • Validate data types
  • Generate quality metrics
  • Export HTML report

Key Skills: Data validation, statistical analysis, reporting

Assessment Criteria

  • [ ] Load and clean real-world datasets efficiently
  • [ ] Perform complex data transformations
  • [ ] Use GroupBy for aggregations
  • [ ] Create insightful visualizations
  • [ ] Handle missing and inconsistent data
  • [ ] Optimize performance for large datasets
  • [ ] Document analysis with clear explanations

Resources

Official Documentation

Learning Platforms

Tools

Next Steps

After mastering Pandas, explore:

  • Scikit-learn - Machine learning
  • SQL - Database querying
  • Apache Spark - Big data processing
  • Tableau/Power BI - Business intelligence tools

版本历史

  1. v0.4.1 GitHub ↗
    原版更新说明

    ### 🐛 Bug Fixes - fix(autoskills): stop multiSelect from duplicating lines on redraw [`cc80891`](https://github.com/midudev/autoskills/commit/cc80891)

  2. v0.4.0 GitHub ↗
    原版更新说明

    ### ⚠️ Breaking Changes - refactor(autoskills)!: drop Deno support [`d6f4301`](https://github.com/midudev/autoskills/commit/d6f4301) ### ✨ Features - feat(registry): re-review 41 pending skills with the new pipeline [`aff4e3c`](https://github.com/midudev/autoskills/commit/aff4e3c) - feat(sync): let an AI adjudicate flagged skills instead of a human [`98d42aa`](https://github.com/midudev/autoskills/commit/98d42aa) - fix(registry): add official FastAPI skill and merge duplicate techs [`f58a99c`](https://github.com/midudev/autoskills/commit/f58a99c) - feat(registry): sync skills and drop those removed upstream [`1228788`](https://github.com/midudev/autoskills/commit/1228788) - feat(autoskills): add ui command to browse installed skills [`1e5a14a`](https://github.com/midudev/autoskills/commit/1e5a14a) - Add fastmcp skill for Python MCP server development FastMCP is the standard Python framework for building MCP servers. This skill teaches production patterns verified against FastMCP 3.2.x, specifically addressing APIs that LLMs hallucinate (server.state, on_startup, context.name in middleware — none of which exist). Detection: 'fastmcp' pattern in pyproject.toml/requirements.txt Validation: 97.1% (agentskills.io spec checker) [`8caa407`](https://github.com/midudev/autoskills/commit/8caa407) - feat: add ElysiaJS support with skills registry documentation and icon [`b2e1400`](https://github.com/midudev/autoskills/commit/b2e1400) ### 📦 Other Changes - test(cli): ignore FORCE_COLOR when checking CLI output [`97692cd`](https://github.com/midudev/autoskills/commit/97692cd) - chore(release): skip merge commits in the changelog [`5ba3aa3`](https://github.com/midudev/autoskills/commit/5ba3aa3) - docs: document ui command, missing flags and the AI review [`0ad8885`](https://github.com/midudev/autoskills/commit/0ad8885) - chore(sync): review skills with Claude and accept --only lists [`5740dd0`](https://github.com/midudev/autoskills/commit/5740dd0) - perf(autoskills): download skill files in parallel [`0293487`](https://github.com/midudev/autoskills/commit/0293487) - build(deps): update Astro 7, Tailwind, oxc, TypeScript 7 and pnpm [`18de798`](https://github.com/midudev/autoskills/commit/18de798)

  3. v0.3.6 GitHub ↗
    原版更新说明

    ### ✨ Features - feat(autoskills): detect instantdb projects [`c86be97`](https://github.com/midudev/autoskills/commit/c86be97) - feat(autoskills): detect bash scripts [`fe57ba0`](https://github.com/midudev/autoskills/commit/fe57ba0) ### 🐛 Bug Fixes - fix(autoskills): normalize registry paths for downloads [`8477028`](https://github.com/midudev/autoskills/commit/8477028) ### 📦 Other Changes - chore(registry): update synced skill manifest [`442cf12`](https://github.com/midudev/autoskills/commit/442cf12) - chore(registry): sync turborepo skill [`3fadf74`](https://github.com/midudev/autoskills/commit/3fadf74) - chore(registry): sync backend and rails skills [`db3b50b`](https://github.com/midudev/autoskills/commit/db3b50b) - chore(registry): sync frontend and mobile skills [`49550f5`](https://github.com/midudev/autoskills/commit/49550f5)

  4. v0.3.5 GitHub ↗
    原版更新说明

    ### ✨ Features - feat(cli): surface skill security warnings [`aba2acf`](https://github.com/midudev/autoskills/commit/aba2acf) - feat(autoskills): display registry security checks [`df77e04`](https://github.com/midudev/autoskills/commit/df77e04) - feat(swiftui): support selecting xctrace runs [`050801e`](https://github.com/midudev/autoskills/commit/050801e) - feat(rails-upgrade): add legacy guide and ci sync workflow [`468fde3`](https://github.com/midudev/autoskills/commit/468fde3) - feat(cloudflare): add flagship feature flag references [`f1b429d`](https://github.com/midudev/autoskills/commit/f1b429d) - feat(azure-diagnostics): add app service and messaging guides [`260ddd4`](https://github.com/midudev/autoskills/commit/260ddd4) - feat(autoskills): add curated Bun skill [`2760757`](https://github.com/midudev/autoskills/commit/2760757) ### 🐛 Bug Fixes - fix(ui): hide single selection group header [`e5c26da`](https://github.com/midudev/autoskills/commit/e5c26da) ### 📦 Other Changes - chore(skills): refresh registry skill guidance [`5d301d5`](https://github.com/midudev/autoskills/commit/5d301d5)

  5. v0.3.4 GitHub ↗
    原版更新说明

    ### ✨ Features - feat(autoskills): add verbose install tracing [`cc409f8`](https://github.com/midudev/autoskills/commit/cc409f8) - feat(autoskills): fall back to main registry mirror [`f7d9155`](https://github.com/midudev/autoskills/commit/f7d9155) ### 🐛 Bug Fixes - fix(release): normalize repository URL for changelog and release summary links [`832819e`](https://github.com/midudev/autoskills/commit/832819e) ### 📦 Other Changes - style(autoskills): format code for improved readability [`a5a3f11`](https://github.com/midudev/autoskills/commit/a5a3f11)

此处仅展示最近 5 个版本。 在原站查看完整版本历史 ↗

当前收录版本

2.1.0

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • 提供完整的 Pandas 数据分析教学体系,涵盖数据加载、清洗、聚合、可视化全流程
  • 包含 3 个实战项目(RFM分析、时间序列、数据质量报告),强化动手能力
  • 面向广泛受众,适合数据分析、商业智能、科研等场景
触发精准90/100

亮点

  • 触发词精准覆盖核心工具(Pandas/NumPy/Matplotlib)与典型场景(data manipulation/analysis/visualization)
  • description 位置正确且内容完整,无截断或错位
结构规范95/100

亮点

  • 结构清晰:理论 → 代码示例 → 实战项目 → 评估标准 → 资源推荐
  • 每个核心主题均配有完整可运行的代码示例
  • frontmatter 完整,包含版本、绑定 Agent、重试策略等关键配置
执行可靠90/100

亮点

  • 代码示例语法规范,函数使用准确,参数合理
  • 覆盖 missing data、duplicates、type conversion 等常见数据异常处理
  • 工具来源明确,均为标准数据科学生态组件
证据可验 (前四项均值)90/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • colab.research.google.com
  • jupyter.org
  • matplotlib.org
  • numpy.org
  • pandas.pydata.org
  • wesmckinney.com
  • www.anaconda.com
  • www.datacamp.com
  • www.kaggle.com

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。