great-tables-5-grouped-rows-and-columns

Sub-skill of great-tables: 5. Grouped Rows and Columns.

5 stars

Best use case

great-tables-5-grouped-rows-and-columns is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Sub-skill of great-tables: 5. Grouped Rows and Columns.

Teams using great-tables-5-grouped-rows-and-columns should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/5-grouped-rows-and-columns/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/_archive/data/analysis/great-tables/5-grouped-rows-and-columns/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/5-grouped-rows-and-columns/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How great-tables-5-grouped-rows-and-columns Compares

Feature / Agentgreat-tables-5-grouped-rows-and-columnsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Sub-skill of great-tables: 5. Grouped Rows and Columns.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 5. Grouped Rows and Columns

## 5. Grouped Rows and Columns


**Row Groups:**
```python
from great_tables import GT
import pandas as pd

df = pd.DataFrame({
    "Region": ["North", "North", "South", "South", "East", "East", "West", "West"],
    "Product": ["Widget", "Gadget", "Widget", "Gadget", "Widget", "Gadget", "Widget", "Gadget"],
    "Sales": [45000, 32000, 38000, 41000, 52000, 28000, 35000, 39000],
    "Units": [450, 160, 380, 205, 520, 140, 350, 195]
})

table = (
    GT(df, groupname_col="Region")  # Group by Region
    .tab_header(
        title="Sales by Region and Product",
        subtitle="Q4 2025 Performance"
    )
    .fmt_currency(columns="Sales", currency="USD", decimals=0)
    .fmt_integer(columns="Units", use_seps=True)

    # Style group labels
    .tab_style(
        style=[
            style.fill(color="#e8e8e8"),
            style.text(weight="bold")
        ],
        locations=loc.row_groups()
    )
)

table.save("row_groups.html")
```

**Column Spanners:**
```python
from great_tables import GT
import pandas as pd

df = pd.DataFrame({
    "Product": ["Widget A", "Widget B", "Gadget X"],
    "Q1_Sales": [25000, 32000, 18000],
    "Q1_Units": [250, 320, 90],
    "Q2_Sales": [28000, 35000, 22000],
    "Q2_Units": [280, 350, 110],
    "Q3_Sales": [31000, 38000, 25000],
    "Q3_Units": [310, 380, 125]
})

table = (
    GT(df)
    .tab_header(title="Quarterly Performance")

    # Create column spanners
    .tab_spanner(
        label="Q1",
        columns=["Q1_Sales", "Q1_Units"]
    )
    .tab_spanner(
        label="Q2",
        columns=["Q2_Sales", "Q2_Units"]
    )
    .tab_spanner(
        label="Q3",
        columns=["Q3_Sales", "Q3_Units"]
    )

    # Rename columns
    .cols_label(
        Q1_Sales="Sales",
        Q1_Units="Units",
        Q2_Sales="Sales",
        Q2_Units="Units",
        Q3_Sales="Sales",
        Q3_Units="Units"
    )

    # Format numbers
    .fmt_currency(columns=["Q1_Sales", "Q2_Sales", "Q3_Sales"], currency="USD", decimals=0)
    .fmt_integer(columns=["Q1_Units", "Q2_Units", "Q3_Units"], use_seps=True)
)

table.save("column_spanners.html")
```

**Nested Groups:**
```python
from great_tables import GT
import pandas as pd

df = pd.DataFrame({
    "Division": ["Consumer", "Consumer", "Consumer", "Enterprise", "Enterprise", "Enterprise"],
    "Category": ["Electronics", "Home", "Fashion", "Software", "Hardware", "Services"],
    "Product": ["Phones", "Furniture", "Apparel", "Cloud", "Servers", "Consulting"],
    "Revenue": [150, 45, 78, 220, 180, 95],
    "Growth": [0.12, 0.05, -0.02, 0.25, 0.08, 0.15]
})

table = (
    GT(df, groupname_col="Division", rowname_col="Category")
    .tab_header(
        title="Business Unit Performance",
        subtitle="Annual Revenue (Millions USD)"
    )
    .fmt_currency(columns="Revenue", currency="USD", decimals=0)
    .fmt_percent(columns="Growth", decimals=1)
)

table.save("nested_groups.html")
```

Related Skills

taxact-browser-automation-patterns

5
from vamseeachanta/workspace-hub

Patterns for automating TaxAct Business online (Ionic SPA) via Chrome browser MCP tools — field interaction, navigation, shadow DOM handling

handle-browser-automation-financial-site-blocks

5
from vamseeachanta/workspace-hub

Workflow for working around Chrome extension blocks on financial sites during data collection tasks

doc-extraction-naval-architecture-structural-scantling-tables

5
from vamseeachanta/workspace-hub

Sub-skill of doc-extraction-naval-architecture: Structural Scantling Tables.

data-exploration-key-columns

5
from vamseeachanta/workspace-hub

Sub-skill of data-exploration: Key Columns (+5).

great-tables-great-tables-with-streamlit

5
from vamseeachanta/workspace-hub

Sub-skill of great-tables: Great Tables with Streamlit (+1).

great-tables-6-footnotes-and-annotations

5
from vamseeachanta/workspace-hub

Sub-skill of great-tables: 6. Footnotes and Annotations (+1).

great-tables-4-conditional-formatting

5
from vamseeachanta/workspace-hub

Sub-skill of great-tables: 4. Conditional Formatting.

great-tables-3-styling-and-colors

5
from vamseeachanta/workspace-hub

Sub-skill of great-tables: 3. Styling and Colors.

great-tables-1-keep-tables-focused

5
from vamseeachanta/workspace-hub

Sub-skill of great-tables: 1. Keep Tables Focused (+3).

great-tables-1-basic-table-creation

5
from vamseeachanta/workspace-hub

Sub-skill of great-tables: 1. Basic Table Creation.

obsidian-notes-by-area-grouped

5
from vamseeachanta/workspace-hub

Sub-skill of obsidian: Notes by Area (grouped).

test-oversized-skill

5
from vamseeachanta/workspace-hub

A test fixture skill that exceeds 200 lines with multiple H2/H3 sections for split testing.