Chuyển đến nội dung
Skillpedia
Phân tích và bảng tính41k · #6608

clean-data-xls

Skill này làm gì

Skill này hướng dẫn agent AI dọn dẹp dữ liệu lộn xộn trong bảng tính trước khi phân tích. Skill dành cho bất kỳ ai có bảng tính với định dạng không nhất quán, trùng lặp hoặc lỗi.

Khi nào nên dùng

  • ✓Khi bảng tính có tên, chữ hoa chữ thường hoặc định dạng ngày không nhất quán.
  • ✓Khi số được lưu dạng chữ và không cộng được.
  • ✓Khi bạn cần xóa các dòng trùng lặp trước khi phân tích dữ liệu.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/anthropics/financial-services/blob/main/plugins/vertical-plugins/financial-analysis/skills/clean-data-xls/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Dọn dẹp bảng doanh số lộn xộn này để ngày, số và tên khách hàng nhất quán.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent lập hồ sơ từng cột, tìm các vấn đề như khoảng trắng thừa, định dạng ngày lẫn lộn và trùng lặp, rồi đề xuất cách sửa trước khi áp dụng. Nó hoạt động trong add-in Excel đang mở hoặc trên một tệp.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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
Câu hỏi thường gặp

Nó có thay đổi dữ liệu của tôi mà không cho tôi xem không?

Không. Skill đề xuất sửa trước để bạn xem xét trước khi áp dụng.

Nó phát hiện những vấn đề gì?

Khoảng trắng, chữ hoa chữ thường, số lưu dạng chữ, ngày lẫn lộn, trùng lặp, ô trống, kiểu dữ liệu hỗn hợp, lỗi mã hóa và lỗi công thức.

Nó có thể làm sạch một phần của trang tính không?

Có. Bạn có thể chỉ định một phạm vi, nếu không nó sẽ dùng toàn bộ vùng đang dùng của trang tính hiện hoạt.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
41k
Vị trí xếp hạng
#6608
Giấy phép
Apache-2.0
Cập nhật
28/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự