Agent skill
great-tables-2-column-formatting
Sub-skill of great-tables: 2. Column Formatting.
Install this agent skill to your Project
npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_archive/data/analysis/great-tables/2-column-formatting
SKILL.md
2. Column Formatting
2. Column Formatting
Numeric Formatting:
from great_tables import GT
import pandas as pd
df = pd.DataFrame({
"Item": ["Product A", "Product B", "Product C"],
"Price": [29.99, 149.50, 9.99],
"Revenue": [1500000, 2250000, 890000],
"Margin": [0.35, 0.42, 0.28],
"Units": [50000, 15000, 89000]
})
table = (
GT(df)
.tab_header(title="Product Metrics")
# Format as currency
.fmt_currency(
columns="Price",
currency="USD"
)
# Format large numbers with suffixes
.fmt_number(
columns="Revenue",
use_seps=True,
decimals=0
)
# Format as percentage
.fmt_percent(
columns="Margin",
decimals=1
)
# Format with thousand separators
.fmt_integer(
columns="Units",
use_seps=True
)
)
table.save("numeric_formatting.html")
Date and Time Formatting:
from great_tables import GT
import pandas as pd
from datetime import datetime, date
df = pd.DataFrame({
"Event": ["Launch", "Update", "Maintenance", "Release"],
"Date": [
date(2025, 1, 15),
date(2025, 3, 22),
date(2025, 6, 1),
date(2025, 9, 30)
],
"Timestamp": [
datetime(2025, 1, 15, 9, 0),
datetime(2025, 3, 22, 14, 30),
datetime(2025, 6, 1, 2, 0),
datetime(2025, 9, 30, 10, 0)
]
})
table = (
GT(df)
.tab_header(title="Product Timeline")
# Format date
.fmt_date(
columns="Date",
date_style="day_month_year"
)
# Format datetime
.fmt_datetime(
columns="Timestamp",
date_style="yMd",
time_style="Hm"
)
)
table.save("date_formatting.html")
Custom Number Formatting:
from great_tables import GT
import pandas as pd
df = pd.DataFrame({
"Metric": ["Users", "Revenue", "Conversion", "Avg Order"],
"Value": [1234567, 5678901.23, 0.0342, 156.789]
})
table = (
GT(df)
.tab_header(title="Dashboard Metrics")
# Custom suffixes for large numbers
.fmt_number(
columns="Value",
rows=[0], # First row only
compact=True # Use K, M, B suffixes
)
# Currency for second row
.fmt_currency(
columns="Value",
rows=[1],
currency="USD",
decimals=0
)
# Percentage for third row
.fmt_percent(
columns="Value",
rows=[2],
decimals=2
)
# Standard number for fourth row
.fmt_currency(
columns="Value",
rows=[3],
currency="USD",
decimals=2
)
)
table.save("custom_formatting.html")
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-complete-milestone
Archive completed milestone and prepare for next version
gsd-reapply-patches
Reapply local modifications after a GSD update
gsd-verify-work
Validate built features through conversational UAT
gsd-thread
Manage persistent context threads for cross-session work
clinical-trial-protocol
Generate clinical trial protocols for medical devices or drugs through a modular, waypoint-based architecture with research-only and full protocol modes.
single-cell-rna-qc
Performs quality control on single-cell RNA-seq data (.h5ad or .h5 files) using scverse best practices with MAD-based filtering and comprehensive visualizations.
Didn't find tool you were looking for?