😫 Vấn đề (The Pain Point)
Hệ thống A xuất file CSV lỗi font tiếng Việt. Hệ thống B chỉ nhận file JSON. Sếp chỉ biết đọc Excel. Bạn đứng giữa và phải convert dữ liệu thủ công.
🚀 Giải pháp Agentic (The Solution)
Tool “Universal Converter”: Nhận vào bất kỳ định dạng nào, xuất ra định dạng bạn muốn.
Tính năng:
- Encoding Fix: Tự động xử lý lỗi phông chữ (UTF-8) khi chuyển CSV sang Excel.
- Batch Convert: Chuyển đổi cả folder cùng lúc.
🤖 Engineering Prompt (Copy & Paste)
**Role:** Python Data Engineer
**Task:** Create a "Batch Data Format Converter".
**Requirements:**
1. **Tech Stack:** Python, `tkinter`, `pandas`.
2. **GUI:**
* Select Source Folder.
* **Target Format (Dropdown):** XLSX, CSV, JSON.
* "Convert" button.
3. **Logic:**
* Detect input file type (.csv, .xlsx, .json).
* Load into Pandas DataFrame.
* Export to Target Format.
* **CSV Encoding:** Always use `utf-8-sig` to ensure Excel opens CSVs correctly with Vietnamese characters.
4. **Deliverables:**
* `format_convert.py`
* `run.bat`
* `requirements.txt`
**Context:** Bridging data between different software systems.
🧠 Giải mã Prompt
- UTF-8-SIG: Đây là “bí mật” để Excel mở file CSV tiếng Việt không bị lỗi. Prompt kỹ thuật này giúp bạn tránh được lỗi kinh điển mà người mới hay gặp.
🛠️ Hướng dẫn
- Copy Prompt -> Paste -> Chạy.
- Chọn Folder chứa CSV -> Chọn Target XLSX -> Convert.