📊

Lọc trùng dữ liệu Excel nâng cao

Tìm và loại bỏ các dòng dữ liệu trùng lặp trong Excel dựa trên nhiều tiêu chí (SĐT, Email...).

Excel ⭐⭐ Intermediate ⏱️ 5 phút

😫 Vấn đề (The Pain Point)

Danh sách khách hàng 10.000 dòng có nhiều người đăng ký 2-3 lần. Excel có nút “Remove Duplicates” nhưng nó xóa mất tiêu, bạn không biết nó xóa ai. Bạn muốn giữ lại danh sách bị xóa để kiểm tra.

🚀 Giải pháp Agentic (The Solution)

Tool lọc trùng thông minh: Tách riêng danh sách “Sạch” và danh sách “Trùng” ra 2 sheet khác nhau.

Tính năng:

  • Custom Key: Lọc trùng theo SĐT, hoặc Email, hoặc cả hai.
  • Audit Trail: Không xóa mất dữ liệu, chỉ phân loại.
  • Keep Last/First: Chọn giữ lại người đăng ký mới nhất hay cũ nhất.

Excel Deduplicator Screenshot

🤖 Engineering Prompt (Copy & Paste)

**Role:** Python Data Analyst

**Task:** Create a "Smart Excel Deduplicator".

**Requirements:**
1.  **Tech Stack:** Python, `tkinter`, `pandas`.
2.  **GUI:**
    *   Select Excel File.
    *   Select "Key Column" (from dropdown of columns found in file).
    *   Option: "Keep First" or "Keep Last".
    *   "Process" button.
3.  **Logic:**
    *   Load Excel.
    *   Identify duplicates: `df[df.duplicated(subset=Key, keep=False)]`.
    *   Split into `Clean_Data` and `Removed_Duplicates`.
    *   Save to new Excel with 2 Sheets.
4.  **Deliverables:**
    *   `excel_dedup.py`
    *   `run.bat`
    *   `requirements.txt`

**Context:** Cleaning customer lists (CRM) before marketing campaigns.

🧠 Giải mã Prompt

  • 2 Sheets Output: Yêu cầu output ra 2 sheet giúp user an tâm tuyệt đối vì họ có thể kiểm chứng lại những gì tool đã “lọc” bỏ.

🛠️ Hướng dẫn

  1. Copy Prompt -> Paste -> Chạy.
  2. Chọn File -> Chọn cột “Số điện thoại” -> Process.

Workflows liên quan

Khám phá danh mục khác

📬

Get Started with Agentic Working

Subscribe to receive updates from AgenticWorking.io

📖 Free eBook Guide 📦 7 Ready-to-use Scripts 🔔 Weekly Tips

No spam, unsubscribe anytime. Join 1,000+ subscribers.