pandas-data-processing-3-data-transformation
Sub-skill of pandas-data-processing: 3. Data Transformation.
Best use case
pandas-data-processing-3-data-transformation is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of pandas-data-processing: 3. Data Transformation.
Teams using pandas-data-processing-3-data-transformation 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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/3-data-transformation/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How pandas-data-processing-3-data-transformation Compares
| Feature / Agent | pandas-data-processing-3-data-transformation | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sub-skill of pandas-data-processing: 3. Data Transformation.
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
# 3. Data Transformation
## 3. Data Transformation
**Pivot Operations:**
```python
def pivot_mooring_data(
df: pd.DataFrame,
index: str = 'Time',
columns: str = 'LineID',
values: str = 'Tension'
) -> pd.DataFrame:
"""
Pivot long-format mooring data to wide format.
Args:
df: Input DataFrame in long format
index: Index column (usually time)
columns: Column to pivot (usually line identifier)
values: Value column (tension, angle, etc.)
Returns:
Pivoted DataFrame
"""
pivoted = df.pivot(
index=index,
columns=columns,
values=values
)
# Rename columns
pivoted.columns = [f'{values}_Line{col}' for col in pivoted.columns]
return pivoted
# Example: Convert long format to wide format
# Long format:
# Time LineID Tension
# 0.0 1 1500
# 0.0 2 1520
# 0.1 1 1505
# 0.1 2 1525
long_format = pd.DataFrame({
'Time': [0.0, 0.0, 0.1, 0.1, 0.2, 0.2],
'LineID': [1, 2, 1, 2, 1, 2],
'Tension': [1500, 1520, 1505, 1525, 1510, 1530]
})
wide_format = pivot_mooring_data(long_format)
print(wide_format)
# Output:
# Tension_Line1 Tension_Line2
# Time
# 0.0 1500 1520
# 0.1 1505 1525
# 0.2 1510 1530
```
**Melt Operations:**
```python
def melt_wide_format(
df: pd.DataFrame,
id_vars: list = None,
value_name: str = 'Value',
var_name: str = 'Parameter'
) -> pd.DataFrame:
"""
Convert wide-format data to long format.
Args:
df: Input DataFrame in wide format
id_vars: Identifier variables to preserve
value_name: Name for value column
var_name: Name for variable column
Returns:
Melted DataFrame
"""
if id_vars is None:
id_vars = [df.index.name or 'index']
df_reset = df.reset_index()
else:
df_reset = df
melted = pd.melt(
df_reset,
id_vars=id_vars,
value_name=value_name,
var_name=var_name
)
return melted
# Example: Convert multi-column tensions to long format
wide_data = pd.DataFrame({
'Time': [0.0, 0.1, 0.2],
'Tension_Line1': [1500, 1505, 1510],
'Tension_Line2': [1520, 1525, 1530],
'Tension_Line3': [1480, 1485, 1490]
})
long_data = melt_wide_format(
wide_data,
id_vars=['Time'],
value_name='Tension',
var_name='Line'
)
print(long_data)
# Output:
# Time Line Tension
# 0.0 Tension_Line1 1500
# 0.0 Tension_Line2 1520
# 0.0 Tension_Line3 1480
# ...
```Related Skills
data-validation-reporter
Generate interactive validation reports with quality scoring, missing data analysis, and type checking. Combines Pandas validation, Plotly visualization, and YAML configuration for comprehensive data quality reporting.
worldenergydata-source-readiness
Route agents to the canonical worldenergydata source-readiness skill and summary script. Use when asked for worldenergydata data completeness, data locations, latest known data dates, scheduler freshness, source-readiness status, or acceptance-criteria inputs across the repo ecosystem.
sodir-data-extractor
Extract and process Norwegian Petroleum Directorate field and production data from SODIR
metocean-data-fetcher
Fetch real-time and historical metocean data from NDBC, CO-OPS, Open-Meteo, ERDDAP, and MET Norway. Use for buoy data retrieval, tidal observations, marine forecasts, and multi-source data fusion.
energy-data-visualizer
Interactive visualization for oil and gas production data analysis using Plotly dashboards
bsee-data-extractor
Extract and process BSEE (Bureau of Safety and Environmental Enforcement) data including production, WAR (Well Activity Reports), and APD (Application for Permit to Drill) data. Use for querying production data, well activities, drilling permits, completions, and workovers by API number, block, lease, or field with automatic data normalization and caching.
tax-return-data-capture-and-archival
Capture structured tax return summaries as YAML for year-over-year comparison, with fallback to manual PDF download and relocation when automation fails
repo-separation-for-sensitive-data
Architecture pattern for splitting confidential data and reusable algorithms across repos
metadata-only-wiki-sweep-workflow
Disciplined inventory process for cataloging documents by filename/path without content claims, using parent-centric grouping to prevent stub proliferation
metadata-only-inventory-sweep
Execute constrained file inventory sweeps with metadata-only stubs and validation, useful for staged documentation work on large file sets
handle-blocked-financial-sites-data-export
Workflow for extracting data from blocked financial sites when browser automation is restricted
financial-data-export-workflow
Structured process for exporting and analyzing multi-year brokerage transaction history when browser automation is blocked