📊

Name Splitter

Split full names into First, Middle, and Last name columns with Vietnamese name support.

Excel ⭐ Beginner ⏱️ 2 minutes

😫 The Pain Point

You have 1000 contacts with full names in one column (“Nguyen Van An”, “John Smith”). You need separate First, Middle, and Last name columns for your CRM import.

🚀 Agentic Solution

A Smart Name Parser that handles different name formats including Vietnamese names.

Key Features:

  • Vietnamese Support: Understands that “Nguyen” is family name (first in Vietnamese convention).
  • Multiple Formats: “First Last”, “Last, First”, “First Middle Last”.
  • Edge Cases: Handles single names, suffixes (Jr., PhD).

⚔️ Phase 1: Commander (Quick Fix)

For quick parsing.

Prompt:

“I have an Excel contacts.xlsx with column ‘Full_Name’ containing Vietnamese names (format: ‘Last Middle First’, e.g., ‘Nguyen Van An’). Write a Python script using Pandas to:

  1. Split: Into ‘Ho’ (Last), ‘Ten_Dem’ (Middle), ‘Ten’ (First).
  2. Handle: Names with only 2 parts (Last First) or 1 part.
  3. Output: Save as contacts_split.xlsx.

Print sample results for verification.”

Result: Properly structured name data.

🏗️ Phase 2: Architect (Permanent Tool)

For Admin Staff.

Engineering Prompt:

**Role:** Python GUI Developer (PyQt6 Specialist)
**Task:** Create "Smart Name Parser" Desktop App

**Objective:** A tool to accurately split full names into First/Middle/Last components, supporting multicultural formats.

**Tech Stack:**
* Language: Python 3.10+
* GUI Library: PyQt6 (Cross-platform)
* Data Engine: Pandas
* Packaging: PyInstaller

**Functional Requirements:**
1.  **UI Layout (PyQt6):**
    *   **Data:** Excel File Input.
    *   **Config:** Toggle for Name Format (Western "F M L" vs Vietnamese "L M F").
    *   **Preview:** Live split preview of the first 5 rows.
    *   **Action:** "Process & Save" button.

2.  **Core Logic:**
    *   Split string by whitespace.
    *   Assign components based on selected format logic.
    *   Handle edge cases (single word names, 4+ word names).
    *   **Threading:** Processing loop in background.

3.  **Deliverables:**
    *   `main.py`: Complete source code.
    *   `requirements.txt`: Dependencies.
    *   **Build Instructions:**
        *   Windows: `pyinstaller --onefile --noconsole main.py`
        *   macOS: `pyinstaller --windowed --noconsole main.py`

🧠 Prompt Decoding

  • Vietnamese Names: Family name comes first, given name comes last. Opposite of Western convention.

🛠️ Instructions

  1. Copy Prompt → Run.
  2. Verify sample output before bulk processing.

Related Workflows

Explore other categories

📬

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.