data-profiler
Generate data profiles with column stats, correlations, and missing patterns for DataFrames. Use for EDA and data discovery.
What this skill does
# Data Profiler
**Audience:** Data engineers and analysts exploring new datasets.
**Goal:** Generate comprehensive profiles including statistics, correlations, and missing patterns.
## Scripts
Execute profiling functions from `scripts/profiling.py`:
```python
from scripts.profiling import (
profile_dataframe,
print_profile_summary,
profile_correlations,
profile_missing_patterns
)
```
## Usage Examples
### Basic Profiling
```python
import pandas as pd
from scripts.profiling import profile_dataframe, print_profile_summary
df = pd.read_csv('data.csv')
profile = profile_dataframe(df)
print_profile_summary(profile)
```
**Output:**
```
Shape: 10,000 rows x 15 columns
Memory: 1.23 MB
Column Summary:
id (int64): 10,000 unique, no nulls
email (object): 9,847 unique, 1.53% null
revenue (float64): 3,421 unique, no nulls
created_at (datetime64[ns]): 365 unique, no nulls
```
### Correlation Analysis
```python
from scripts.profiling import profile_correlations
corr = profile_correlations(df, threshold=0.7)
if corr['high_correlations']:
print("Highly correlated columns:")
for c in corr['high_correlations']:
print(f" {c['col1']} <-> {c['col2']}: {c['correlation']}")
```
### Missing Data Patterns
```python
from scripts.profiling import profile_missing_patterns
missing = profile_missing_patterns(df)
for col, stats in missing.items():
if col != 'co_missing_columns':
print(f"{col}: {stats['percent']}% missing, max {stats['consecutive_max']} consecutive")
# Check for columns missing together
if 'co_missing_columns' in missing:
for col1, col2, pct in missing['co_missing_columns']:
print(f"{col1} and {col2} both missing {pct}% of time")
```
## Profile Output Schema
```yaml
shape: [rows, columns]
memory_mb: float
columns:
column_name:
dtype: string
null_count: int
null_pct: float
unique_count: int
unique_pct: float
# Numeric columns add:
min: float
max: float
mean: float
std: float
median: float
zeros: int
negatives: int
# String columns add:
min_length: int
max_length: int
top_values: {value: count}
# Datetime columns add:
min_date: string
max_date: string
date_range_days: int
```
## Analysis Dimensions
### Numeric Columns
- Min, max, range, mean, median, mode
- Standard deviation, variance, skewness, kurtosis
- Percentiles (5, 25, 50, 75, 95)
- Zero count, negative count
- Outlier detection (IQR method)
### String Columns
- Min/max/avg length
- Pattern analysis (emails, phones, URLs)
- Top N frequent values
- Whitespace issues (leading/trailing)
- Case distribution (upper/lower/mixed)
- Empty string count
### DateTime Columns
- Min/max dates, date range span
- Missing dates in sequence
- Day of week distribution
- Hour distribution (if timestamp)
### Categorical Columns
- Cardinality, value distribution
- Imbalance ratio
- Rare categories (< 1%)
## Correlation Analysis
```python
correlation_matrix = df.select_dtypes(include=[np.number]).corr()
# Highly correlated pairs (> 0.8)
high_corr = []
for i in range(len(correlation_matrix.columns)):
for j in range(i+1, len(correlation_matrix.columns)):
if abs(correlation_matrix.iloc[i, j]) > 0.8:
high_corr.append((
correlation_matrix.columns[i],
correlation_matrix.columns[j],
correlation_matrix.iloc[i, j]
))
```
## Quality Flags
Automatically flag:
- **High nulls:** > 50% missing values
- **Constant column:** Only 1 unique value
- **High cardinality:** Unique ratio > 95% (possible ID)
- **Suspected duplicates:** Based on key columns
- **Data type mismatch:** Numeric stored as string
- **Future dates:** Dates beyond today
- **Negative values:** In typically positive columns
## Report Sections
### Executive Summary
- Dataset shape (rows x columns), memory footprint
- Overall quality score, critical issues count
### Column-by-Column Analysis
- Statistics table, distribution histogram (ASCII for terminal)
- Top values (for categorical), quality warnings
### Relationships
- Correlation heatmap summary
- Potential foreign key relationships, column dependencies
### Recommendations
- Suggested data type optimizations
- Columns to investigate, potential data quality rules
## Output Formats
- **Markdown Report:** Full detailed report with tables
- **JSON Summary:** Machine-readable profile for programmatic use
- **HTML Dashboard:** Interactive report with charts (if ydata-profiling available)
## Dependencies
```
pandas
numpy
```
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.