本文へスキップ
Skillpedia
分析とスプレッドシート41k · #6608

clean-data-xls

できること

このスキルは、分析の前にスプレッドシートの乱れたデータを整理する流れを、AIエージェントに案内します。書式の不統一、重複、エラーがあるスプレッドシートを扱う人向けです。

使う場面

  • ✓スプレッドシートで、名前、大文字小文字、日付の形式がそろっていないとき。
  • ✓数値が文字列として保存されていて、合計が合わないとき。
  • ✓分析の前に、重複した行を削除する必要があるとき。

スキルのリンク

https://github.com/anthropics/financial-services/blob/main/plugins/vertical-plugins/financial-analysis/skills/clean-data-xls/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/anthropics/financial-services/blob/main/plugins/vertical-plugins/financial-analysis/skills/clean-data-xls/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“この乱れた売上シートを整理して、日付、数値、顧客名がそろうようにしてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは各列を調べ、余分な空白、混在する日付形式、重複などの問題を見つけます。適用する前に修正案を示します。開いているExcelのアドインでも、ファイル上でも作業できます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Clean Data

Clean messy data in the active sheet or a specified range.

Environment

  • If running inside Excel (Office Add-in / Office JS): Use Office JS directly (Excel.run(async (context) => {...})). Read via range.values, write helper-column formulas via range.formulas = [["=TRIM(A2)"]]. The in-place vs helper-column decision still applies.
  • If operating on a standalone .xlsx file: Use Python/openpyxl.

Workflow

Step 1: Scope

  • If a range is given (e.g. A1:F200), use it
  • Otherwise use the full used range of the active sheet
  • Profile each column: detect its dominant type (text / number / date) and identify outliers

Step 2: Detect issues

Issue What to look for
Whitespace leading/trailing spaces, double spaces
Casing inconsistent casing in categorical columns (usa / USA / Usa)
Number-as-text numeric values stored as text; stray $, ,, % in number cells
Dates mixed formats in the same column (3/8/26, 2026-03-08, March 8 2026)
Duplicates exact-duplicate rows and near-duplicates (case/whitespace differences)
Blanks empty cells in otherwise-populated columns
Mixed types a column that's 98% numbers but has 3 text entries
Encoding mojibake (é, ’), non-printing characters
Errors #REF!, #N/A, #VALUE!, #DIV/0!

Step 3: Propose fixes

Show a summary table before changing anything:

Column Issue Count Proposed Fix

Step 4: Apply

  • Prefer formulas over hardcoded cleaned values — where the cleaned output can be expressed as a formula (e.g. =TRIM(A2), =VALUE(SUBSTITUTE(B2,"$","")), =UPPER(C2), =DATEVALUE(D2)), write the formula in an adjacent helper column rather than computing the result in Python and overwriting the original. This keeps the transformation transparent and auditable.
  • Only overwrite in place with computed values when the user explicitly asks for it, or when no sensible formula equivalent exists (e.g. encoding/mojibake repair)
  • For destructive operations (removing duplicates, filling blanks, overwriting originals), confirm with the user first
  • After each category of fix (whitespace → casing → number conversion → dates → dedup), show the user a sample of what changed and get confirmation before moving to the next category
  • Report a before/after summary of what changed
よくある質問

確認せずにデータを変更しますか?

いいえ。このスキルは先に修正案を示すので、適用する前に確認できます。

どんな問題を検出できますか?

空白、大文字小文字、数値の文字列化、日付の混在、重複、空欄、型の混在、文字化け、数式エラーです。

シートの一部だけを整理できますか?

はい。範囲を指定できます。指定しない場合は、アクティブなシートの使用範囲全体を対象にします。

詳細

作者による元の説明

Clean up messy spreadsheet data — trim whitespace, fix inconsistent casing, convert numbers-stored-as-text, standardize dates, remove duplicates, and flag mixed-type columns. Use when data is messy, inconsistent, or needs prep before analysis. Triggers on "clean this data", "clean up this sheet", "normalize this data", "fix formatting", "dedupe", "standardize this column", "this data is messy".

repo: anthropics/financial-services

人気

GitHubのスター
41k
ランキング
#6608
ライセンス
Apache-2.0
更新日
2026/10/28

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル