界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
数据与研究 · SKILL.md

skill-002

skill-002

【数据与研究】Advanced tools for creating, modifying, and analyzing pivot tables in Excel, enabling quick data summarization and insights.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: skill-002 description: "Advanced tools for creating, modifying, and analyzing pivot tables in Excel, enabling quick data summarization and insights." license: Proprietary. LICENSE.txt has complete terms

Requirements for Outputs

General Pivot Table Standards

Data Source Integrity

  • Ensure that the data source for pivot tables is complete and well-structured to avoid errors.
  • Pivot tables should not reference cells that contain errors or are blank.

Naming Conventions

  • Use clear and descriptive names for pivot tables and their associated fields to enhance usability.

Pivot Table Creation Techniques

Basic Creation Steps

  • Pivot tables should be created directly from well-structured data ranges.
  • Example code snippet:
import pandas as pd

def create_pivot_table(df):
    pivot_table = df.pivot_table(values='Sales', index='Product', columns='Region', aggfunc='sum')
    return pivot_table

Advanced Modifications

  • Users should be able to modify pivot tables to include calculated fields and filters as needed.
  • Example code snippet:
def add_calculated_field(pivot_table):
    pivot_table['Profit'] = pivot_table['Sales'] - pivot_table['Cost']
    return pivot_table

Documentation and Validation Requirements

Metadata Inclusion

  • Each pivot table must include metadata specifying its source data and any calculations performed.
  • Example: "Pivot Table based on Sales Data from 2023 Q1."

Change Tracking

  • Maintain a log of changes made to pivot tables to facilitate auditing and validation.
我的收藏