Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aws-samples avatar

Data Structure Checker

  • 2 installs
  • 48 repo stars
  • Updated August 5, 2026
  • aws-samples/sample-deep-insight

data-structure-checker is a Claude skill that reads any tabular data file and automatically fixes headers, encoding, empty rows, and types to return a clean pandas DataFrame.

About

Reads any tabular data file (Excel, CSV, Parquet, ODS) and automatically detects and fixes common issues, returning a clean pandas DataFrame. It flattens multi-level headers, resolves encoding problems, drops empty rows and columns, infers data types, and handles Unicode/CJK filenames. A data engineer or analyst uses it to load messy spreadsheets without manual cleanup before analysis.

  • Auto-detects and fixes messy tabular data (Excel, CSV, Parquet, ODS) into a clean DataFrame
  • Handles multi-level headers, encoding issues, empty rows/columns, and type inference
  • Handles Korean/CJK filenames and multiple encodings (cp949, euc-kr, GBK, Shift_JIS)

Data Structure Checker by the numbers

  • 2 all-time installs (skills.sh)
  • Ranked #1,759 of 2,064 Data Science & ML skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

data-structure-checker capabilities & compatibility

Free; only needs Python and the listed data-reading packages installed locally

Capabilities
data cleaning · tabular parsing · encoding detection
Use cases
data analysis
Pricing
Free
From the docs

What data-structure-checker says it does

This skill should be used when reading any tabular data file (Excel, CSV, Parquet, ODS). It automatically detects and fixes common data issues
SKILL.md
Input any messy file and receive a clean DataFrame ready for analysis - zero intervention required.
SKILL.md
npx skills add https://github.com/aws-samples/sample-deep-insight --skill data-structure-checker

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2
repo stars48
Last updatedAugust 5, 2026
Repositoryaws-samples/sample-deep-insight

What it does

Read a messy Excel or CSV file and get a clean pandas DataFrame with headers, encoding, and types auto-fixed.

Who is it for?

Loading messy or multi-header spreadsheets, including CJK-encoded files, into a clean DataFrame with zero manual cleanup

Skip if: Non-tabular data, or pipelines that already receive clean, well-typed DataFrames

When should I use this skill?

Reading any Excel, CSV, TSV, ODS, or Parquet file, or hitting Unnamed: columns and multi-level headers

What you get

A clean pandas DataFrame with flattened headers, correct encoding, dropped empties, and inferred types, plus an optional report of fixes

  • Clean pandas DataFrame
  • Optional report of issues detected and fixes applied

By the numbers

  • Supports 6 tabular formats (xlsx, xls, csv, tsv, ods, parquet)
  • Auto-detects encodings including UTF-8, CP949, EUC-KR, GBK, and Shift_JIS

Files

SKILL.mdMarkdownGitHub ↗

Data Structure Checker

Overview

A comprehensive skill for automatically detecting and fixing common data file issues. Input any messy file and receive a clean DataFrame ready for analysis - zero intervention required.

Auto-fixes:

  • Multi-level/hierarchical headers (flattens with separator)
  • Encoding issues (utf-8, cp949, euc-kr, etc.)
  • Empty rows and columns
  • Data type inference and conversion
  • Duplicate column names
  • Unicode path issues (Korean/CJK filenames)

When to Use

This skill should be triggered when:

  • Reading any Excel files (.xlsx, .xls)
  • Reading any CSV/TSV files
  • Reading ODS files (OpenDocument)
  • Reading Parquet files
  • Encountering "Unnamed:" columns in data
  • Dealing with multi-level or hierarchical headers
  • Processing Korean/Asian language data files

Usage

Reading Data Files

To read any tabular data file with automatic issue detection and fixing, execute the scripts/checker.py script:

import sys
sys.path.insert(0, 'skills/data-structure-checker/scripts')
from checker import smart_read

# Read file - handles all issues automatically
df = smart_read('data.xlsx')

# Read with report of fixes applied
df, report = smart_read('data.xlsx', return_report=True)

Diagnosing Files

To analyze a file's structure without reading full data:

from checker import diagnose

result = diagnose('data.xlsx')
# Returns: {'issues': ['multi_level_headers'], 'recommendations': [...]}

Command Line

# Read and display summary
uv run python skills/data-structure-checker/scripts/checker.py data.xlsx

# Diagnose without reading
uv run python skills/data-structure-checker/scripts/checker.py data.xlsx --diagnose

API Reference

smart_read(file_path, separator='_', return_report=False, sheet_name=0)

Main entry point for reading files with automatic issue resolution.

Parameters:

  • file_path: Path to the file (handles Korean/Unicode filenames)
  • separator: Character(s) for joining multi-level headers (default: '_')
  • return_report: If True, return (DataFrame, report) tuple
  • sheet_name: Sheet name or index for Excel files

Returns:

  • DataFrame - Clean data ready for analysis
  • Or (DataFrame, report) if return_report=True

diagnose(file_path, sheet_name=0)

Analyze file structure without reading full data.

Returns: Dictionary with detected issues and recommendations.

Report Structure

When return_report=True, the report contains:

{
    'file_path': 'data/file.xlsx',
    'timestamp': '2024-12-17T10:30:00',
    'issues_detected': ['multi_level_headers', 'empty_rows_or_columns'],
    'fixes_applied': [
        'Flattened 3-level headers with "_" separator',
        'Removed 2 empty rows and 0 empty columns'
    ],
    'original_shape': (52, 111),
    'final_shape': (49, 111),
    'header_rows': [0, 1, 2],
    'type_conversions': {'score': 'object -> float64'}
}

Issues Handled

Multi-Level Headers

Detects and flattens hierarchical headers:

Before: 응시자 정보 | Unnamed: 1 | Unnamed: 2

After: 응시자 정보_응시코드 | 응시자 정보_성명 | 응시자 정보_부서

Encoding Issues

Auto-detects encoding for CSV files:

  • UTF-8 (with/without BOM)
  • CP949 (Korean Windows)
  • EUC-KR (Korean legacy)
  • GBK/GB2312 (Chinese)
  • Shift_JIS/EUC-JP (Japanese)

Empty Rows/Columns

Removes rows and columns where all values are NaN.

Data Type Inference

Converts string columns to appropriate types:

  • Numeric strings → float64/int64
  • Date strings → datetime64

Duplicate Columns

Renames duplicates with suffixes: ['score', 'score', 'score']['score', 'score_1', 'score_2']

Unicode Path Issues

Handles Korean/CJK filenames with different Unicode normalizations (NFC/NFD).

Supported Formats

ExtensionFormatNotes
.xlsxExcelModern Excel format
.xlsExcelLegacy Excel format
.csvCSVAuto-detects encoding
.tsvTSVTab-separated values
.odsODSOpenDocument Spreadsheet
.parquetParquetColumnar format

Dependencies

Ensure these packages are installed:

uv pip install openpyxl xlrd odfpy pyarrow

Integration with Deep Insight

To integrate with the coder agent, replace standard pandas read:

# Instead of:
import pandas as pd
df = pd.read_excel('data.xlsx')

# Use:
sys.path.insert(0, 'skills/data-structure-checker/scripts')
from checker import smart_read
df = smart_read('data.xlsx')

Troubleshooting

File not found with Korean filename

The skill handles Unicode normalization automatically. Verify the file path is correct.

Unexpected column names

Check the report's header_rows field. To specify header rows explicitly:

sys.path.insert(0, 'skills/data-structure-checker/scripts')
from reader import read_multi_level
df = read_multi_level('data.xlsx', header_rows=[0, 1])

Preserve original types

To skip type inference, create DataStructureChecker with infer_types=False.

Related skills

FAQ

What file formats does it support?

It supports .xlsx, .xls, .csv, .tsv, .ods, and .parquet, auto-detecting encoding for CSV and handling multi-level headers for Excel.

How do I use it in code?

Import smart_read from scripts/checker.py and call smart_read('data.xlsx'), optionally with return_report=True to get the list of fixes applied.

Data Science & MLpipelinesetl

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.