# Excel Description Filler Tool 📝
Excel Description Filler Tool 📝
Automatically populate product descriptions in your Excel spreadsheet using Python.
Perfect for e-commerce product imports, inventory management, and bulk data processing.
📦 What's Included
| File | Description |
|---|---|
description.py |
The main Python script (heavily commented) |
QUICKSTART.md |
Get started in 5 minutes |
INSTRUCTIONS.md |
Complete step-by-step guide |
TEMPLATE_GUIDE.md |
Examples and formatting templates |
README.md |
This file - project overview |
🎯 What This Tool Does
- ✅ Reads your Excel file with product names
- ✅ Matches products to pre-written descriptions
- ✅ Fills in blank Description cells automatically
- ✅ Preserves existing descriptions (won't overwrite)
- ✅ Saves a new Excel file with completed data
🚀 Quick Start (5 Minutes)
For Experienced Users:
# Install dependencies
pip install pandas openpyxl
# Edit description.py:
# - Update 'path' variable with your Excel filename
# - Update 'descriptions' dictionary with your products
# Run it
python description.py
For New Users:
👉 Start with QUICKSTART.md - step-by-step guide with zero assumptions
📚 Documentation Guide
Choose your path:
| If you want to... | Read this file |
|---|---|
| Get started quickly | QUICKSTART.md |
| Understand every step | INSTRUCTIONS.md |
| See formatting examples | TEMPLATE_GUIDE.md |
| Troubleshoot issues | INSTRUCTIONS.md (Troubleshooting section) |
💡 Use Cases
- E-commerce: Bulk product imports to Shopify, WooCommerce, Magento
- Inventory Management: Add descriptions to existing product lists
- Data Migration: Transfer product catalogs between systems
- Catalog Updates: Refresh descriptions across multiple SKUs
- Wholesale Lists: Create customer-facing product sheets
✨ Key Features
- No Overwriting: Existing descriptions are preserved
- Exact Matching: Uses product names for precise lookup
- Simple Setup: All files in one folder
- Cross-Platform: Works on Windows, Linux, macOS
- Preview Output: See results before opening Excel
- Beginner Friendly: Heavily commented code
🛠️ Requirements
- Python 3.7+ (Python 3.9+ recommended)
- pandas library (data manipulation)
- openpyxl library (Excel file support)
📋 Excel File Requirements
Your Excel file needs these columns: - Item Name - Product names to match - Description - Column to fill (can be empty)
Example:
| Item Name | Description | Price |
|---|---|---|
| Product A | (empty) | $99 |
| Product B | Existing text here | $149 |
| Product C | (empty) | $199 |
After running:
| Item Name | Description | Price |
|---|---|---|
| Product A | AI-generated description for A | $99 |
| Product B | Existing text here (unchanged) | $149 |
| Product C | AI-generated description for C | $199 |
🤖 Getting Descriptions with AI
Quick AI Prompt:
I need concise product descriptions (50-80 words each)
for these products suitable for a professional webstore:
- [Product Name 1]
- [Product Name 2]
- [Product Name 3]
Include key specifications, features, and target use cases.
Format: Professional, B2B tone.
Recommended AI Tools:
- Claude (Anthropic) - Great for technical products
- ChatGPT (OpenAI) - Versatile descriptions
- Gemini (Google) - Good for consumer products
🎓 Tutorial: Your First Run
1. Prepare Your Files
📂 Downloads/
├── description.py
└── my-products.xlsx
2. Edit the Script
Open description.py, find this section:
# Line 19
path = "my-products.xlsx" # ← Your filename here
# Lines 24-50
descriptions = {
"Product A": "Your AI-generated description...",
"Product B": "Another description...",
}
3. Run It
# Windows
python description.py
# Linux/Mac
python3 description.py
4. Check Output
Look for: webstore_import_with_descriptions.xlsx
Done! 🎉
🐛 Common Issues & Solutions
| Issue | Solution |
|---|---|
| "ModuleNotFoundError: pandas" | pip install pandas openpyxl |
| "FileNotFoundError" | Check Excel file is in same folder |
| Descriptions not filling | Product names must match exactly |
| "Permission denied" | Close Excel file if open |
| Character encoding issues | Save .py file as UTF-8 |
See INSTRUCTIONS.md for detailed troubleshooting.
🔐 Security & Privacy
- ✅ Runs locally - No data sent to external servers
- ✅ No internet required - After installing dependencies
- ✅ No data collection - Your files stay on your computer
- ✅ Open source - Review the code yourself
🎯 Best Practices
- Always test first - Try with 2-3 products before bulk processing
- Keep backups - Save a copy of your original Excel file
- Exact matching - Product names must match character-for-character
- Review output - Check the generated file before importing
- Use UTF-8 encoding - Prevents character display issues
📊 Performance
- Processing Speed: ~1,000 rows per second
- File Size Limit: Tested up to 100,000 rows
- Memory Usage: Minimal (< 100MB for typical files)
- Excel Compatibility: .xlsx, .xlsm formats
🆘 Getting Help
Self-Help Resources:
- Read
QUICKSTART.mdfor basic setup - Check
INSTRUCTIONS.mdtroubleshooting section - Review
TEMPLATE_GUIDE.mdfor formatting examples
Verify Your Setup:
# Check Python version (need 3.7+)
python --version
# Check if libraries installed
pip list | grep pandas
pip list | grep openpyxl
🔄 Workflow Summary
1. Get product names from Excel
↓
2. Generate descriptions using AI
↓
3. Format as Python dictionary
↓
4. Update description.py
↓
5. Run script
↓
6. Check output file
↓
7. Import to your system
📝 Example Output
Loading Excel file: products.xlsx
✓ Loaded 15 rows and 5 columns
Processing descriptions...
✓ Filled 12 descriptions
Saving to: webstore_import_with_descriptions.xlsx
✓ File saved successfully!
================================================================================
PREVIEW OF UPDATED DATA:
================================================================================
1. Netgate 8300 TAA
pfSense+ 1U security gateway with Intel Xeon D-1733NT (8-core/16-thread)...
2. Netgate 6100 MAX
Versatile pfSense+ gateway with Intel C3558 (QAT, AES-NI)...
...
✓ Complete! Check 'webstore_import_with_descriptions.xlsx' for your updated data.
================================================================================
🌟 Pro Tips
- Bulk AI Generation: Ask AI to create 20-30 descriptions at once
- Template Reuse: Save your descriptions dictionary for similar products
- Version Control: Number your output files (v1, v2, etc.)
- Quality Check: Always manually review AI-generated descriptions
- Customization: Modify the script for specific column names
📄 License & Credits
- Script License: Free to use and modify
- Created: November 2025
- Python Version: 3.7+
- Dependencies: pandas, openpyxl (both open source)
🚀 Ready to Start?
- New to Python? → Start with
QUICKSTART.md - Need details? → Read
INSTRUCTIONS.md - Want examples? → Check
TEMPLATE_GUIDE.md - Ready to run? → Edit
description.pyand go!
Questions? Review the documentation files included in this package.
Good luck with your product descriptions! 🎉
Quick Start Guide 🚀
Get up and running in 5 minutes!
1️⃣ Install Python (One-time setup)
Windows: Download from python.org → Check "Add Python to PATH"
Linux:
sudo apt install python3 python3-pip
2️⃣ Install Required Libraries (One-time setup)
Windows:
pip install pandas openpyxl
Linux:
pip3 install pandas openpyxl
3️⃣ Get Product Descriptions
Ask AI (Claude/ChatGPT):
Create concise product descriptions (50-80 words) for:
- Product A
- Product B
- Product C
Include key specs and use cases.
4️⃣ Setup Files
Put these in the same folder:
- description.py (the script)
- your-data.xlsx (your Excel file)
5️⃣ Edit the Script
Open description.py and change these lines:
# Line 19: Your Excel filename
path = "your-data.xlsx"
# Lines 24-50: Your product descriptions
descriptions = {
"Product A": "Description for Product A...",
"Product B": "Description for Product B...",
}
6️⃣ Run It!
Windows:
cd C:\Users\YourName\Downloads
python description.py
Linux:
cd ~/Downloads
python3 description.py
✅ Done!
Check for webstore_import_with_descriptions.xlsx in your folder!
⚠️ Common Issues
| Problem | Solution |
|---|---|
| "ModuleNotFoundError" | Run: pip install pandas openpyxl |
| "FileNotFoundError" | Check Excel filename matches script |
| Descriptions not filling | Product names must match exactly |
Need more details? See INSTRUCTIONS.md for the full guide.
Excel Description Filler - User Guide
This script automatically fills in product descriptions in your Excel spreadsheet based on product names. Perfect for e-commerce product imports!
📋 Prerequisites
Step 1: Install Python
Windows:
- Download Python from python.org
- Run the installer
- ✅ IMPORTANT: Check "Add Python to PATH" during installation
- Click "Install Now"
- Verify installation:
python --version
sudo apt update
sudo apt install python3 python3-pip
Verify installation:
python3 --version
---
## 📦 Step 2: Install Required Libraries
### **Windows:**
pip install pandas openpyxl
### **Linux:**
pip3 install pandas openpyxl
**Alternative for Linux (using system packages):**
sudo apt install python3-pandas python3-openpyxl
---
## 🤖 Step 3: Gather Product Descriptions Using AI
### Method A: Use Claude or ChatGPT
**Example prompt:**
I need concise, webstore-ready product descriptions (50-80 words each)
for the following products:
- Netgate 8300 TAA
- Netgate 6100 MAX
- Netgate 4200 BASE
Focus on key specs: processor, ports, use cases. Make them professional
and suitable for B2B customers.
### Method B: Web Scraping Tools (Optional)
If you need to extract descriptions from existing websites:
- **Browser extensions:** Web Scraper, Data Miner
- **Python libraries:** BeautifulSoup, Scrapy (advanced)
- **Online tools:** ParseHub, Octoparse
**Note:** Always check the website's terms of service and robots.txt before scraping.
---
## ✏️ Step 4: Format Your Descriptions for Python
Once you have descriptions from AI or web scraping, format them as a Python dictionary:
descriptions = {
"Product Name 1": "Your description here...",
"Product Name 2": "Another description...",
"Product Name 3": "Yet another description...",
}
**Important formatting rules:**
- Product names must **exactly match** what's in your Excel "Item Name" column
- Use triple quotes `"""` for multi-line descriptions
- Use parentheses `()` for automatic line continuation (as shown in the script)
---
## 📁 Step 5: Organize Your Files
**Place these files in the SAME folder:**
📂 Your Working Folder (e.g., Downloads)
├── description.py ← Your Python script
└── your-excel-file.xlsx ← Your Excel file to process
**Example folder structure:**
**Windows:**
C:\Users\YourName\Downloads\
├── description.py
└── products.xlsx
**Linux:**
/home/username/Downloads/
├── description.py
└── products.xlsx
---
## ⚙️ Step 6: Configure the Script
Open `description.py` in a text editor and update these sections:
### 6.1 Update Input File Name
# CHANGE THIS: Put your Excel filename here
path = "251106 netgate selling price.xlsx" # ← Change to your filename
### 6.2 Update Output File Name (Optional)
# CHANGE THIS: Name for the new file with descriptions
out_path = "webstore_import_with_descriptions.xlsx" # ← Change if desired
### 6.3 Update Product Descriptions
Replace the entire `descriptions = { ... }` section with your products and descriptions.
**Example:**
descriptions = {
"iPhone 15 Pro": (
"Latest flagship smartphone with A17 Pro chip, titanium design, "
"and advanced camera system. Perfect for professionals."
),
"MacBook Air M3": (
"Ultra-thin laptop with M3 chip, 18-hour battery life, "
"and stunning Liquid Retina display."
),
}
▶️ Step 7: Run the Script
Windows:
- Open Command Prompt or PowerShell
- Navigate to your folder:
cd C:\Users\YourName\Downloads - Run the script:
python description.py
Linux:
- Open Terminal
- Navigate to your folder:
cd ~/Downloads - Run the script:
python3 description.py
✅ Expected Output
When successful, you'll see:Saved to: webstore_import_with_descriptions.xlsx
Updated 15 rows
Item Name Description
0 Netgate 8300 TAA pfSense+ 1U security gateway with Intel Xeon...
1 Netgate 8300 MAX High-performance pfSense+ gateway on Intel X...
2 Netgate 8300 BASE pfSense+ 1U security gateway powered by Inte...
...
**A new Excel file will be created with your descriptions filled in!**
📊 Excel Column Requirements
Your Excel file must have these columns: - **Item Name** - The product names to match against - **Description** - The column to fill (can be empty or have existing data) **The script will:** - ✅ Fill empty Description cells based on Item Name matches - ✅ Keep existing descriptions if they're already filled - ✅ Leave Description blank if no match is found in the dictionary🔧 Troubleshooting
Error: "ModuleNotFoundError: No module named 'pandas'"
**Solution:** Install pandas and openpyxl (see Step 2)Error: "FileNotFoundError"
**Solution:** - Check that your Excel file is in the same folder as description.py - Verify the filename in the script matches exactly (including spaces and file extension)Error: "Permission denied"
**Solution:** Close the Excel file if it's openDescriptions not appearing
**Solution:** - Check that product names in your dictionary **exactly match** the "Item Name" column - Look for extra spaces, capitalization differences, or typosCharacter encoding issues (× instead of ×)
**Solution:** Save your .py file with UTF-8 encoding in your text editor💡 Tips & Best Practices
- Test with a copy: Always work on a copy of your Excel file first
- Exact matching: Product names in the dictionary must match your Excel exactly
- Backup your data: Keep the original Excel file safe
- Start small: Test with 2-3 products first before adding all descriptions
- Check output: Open the new Excel file to verify descriptions look correct
🎯 Quick Reference
| Task | Windows | Linux |
|---|---|---|
| Install Python | Download from python.org | sudo apt install python3 python3-pip |
| Install libraries | pip install pandas openpyxl |
pip3 install pandas openpyxl |
| Navigate to folder | cd C:\Users\...\Downloads |
cd ~/Downloads |
| Run script | python description.py |
python3 description.py |
📞 Need Help?
Common issues and solutions: - Script not running? → Check Python is installed: `python --version` or `python3 --version` - Import errors? → Reinstall libraries: `pip install --upgrade pandas openpyxl` - Wrong output? → Check your product names match exactly**Created:** November 2025 **Script Version:** 1.0 **Compatible with:** Python 3.7+
Description Dictionary Template
Use this template to format your product descriptions for the script.Format Rules
- Exact Matching: Product names must exactly match your Excel "Item Name" column
- Use quotes: Both the product name and description must be in quotes
- Comma separation: Each entry ends with a comma (except the last one)
- Multi-line allowed: Use parentheses
()to split long descriptions
Basic Template
descriptions = {
"Product Name 1": "Short description here.",
"Product Name 2": "Another short description.",
"Product Name 3": "Yet another description.",
}
Multi-Line Template (Recommended for Long Descriptions)
descriptions = {
"Product Name 1": (
"First part of the description. "
"Second part of the description. "
"Third part continues here."
),
"Product Name 2": (
"Another product with a longer description "
"that spans multiple lines for better readability. "
"Add specs, features, and use cases."
),
"Product Name 3": (
"Final product description. "
"Keep it concise and professional."
),
}
Real Example - Computer Hardware
descriptions = {
"Dell OptiPlex 7010": (
"Business desktop with 13th Gen Intel Core i5, 16GB RAM, 512GB SSD. "
"Compact design ideal for office environments. "
"Windows 11 Pro, 3-year warranty."
),
"HP ProBook 450 G9": (
"Professional laptop with 12th Gen Intel Core i7, 15.6\" FHD display. "
"Enhanced security features, durable build. "
"Perfect for mobile professionals."
),
"Lenovo ThinkCentre M90t": (
"Reliable tower workstation with Intel vPro support. "
"Tool-free chassis, multiple expansion slots. "
"Built for enterprise IT deployments."
),
}
Real Example - Electronics
descriptions = {
"iPhone 15 Pro 256GB": (
"Latest flagship with A17 Pro chip and titanium design. "
"48MP main camera with 5x telephoto zoom. "
"USB-C connectivity, up to 29 hours video playback."
),
"Samsung Galaxy S24 Ultra": (
"Premium Android with 200MP camera and S Pen integration. "
"6.8\" Dynamic AMOLED display, Snapdragon 8 Gen 3. "
"Built-in AI features for productivity and creativity."
),
"MacBook Air M3": (
"Ultra-portable laptop with Apple M3 chip (8-core CPU). "
"13.6\" Liquid Retina display, up to 18 hours battery. "
"8GB unified memory, silent fanless design."
),
}
Real Example - Office Supplies
descriptions = {
"Staples Heavy Duty Stapler": (
"Metal construction stapler with 100-sheet capacity. "
"Uses standard staples, built-in staple remover. "
"Non-slip base for desktop stability."
),
"Fellowes Paper Shredder 12-Sheet": (
"Cross-cut shredder with 12-sheet capacity and 5-gallon bin. "
"SafeSense technology stops operation when hands touch opening. "
"Ideal for small office or home use."
),
"3M Post-it Notes 3x3 Yellow": (
"Classic sticky notes in canary yellow, 100 sheets per pad. "
"Reliable adhesive that sticks securely and removes cleanly. "
"Standard size perfect for quick reminders and messages."
),
}
Step-by-Step: Adding Your Descriptions
Step 1: List Your Product Names
Get the exact product names from your Excel "Item Name" column:Dell OptiPlex 7010
HP ProBook 450 G9
Lenovo ThinkCentre M90t
Step 2: Get AI-Generated Descriptions
Ask ChatGPT or Claude:Create 50-80 word product descriptions for:
- Dell OptiPlex 7010 (business desktop)
- HP ProBook 450 G9 (laptop)
- Lenovo ThinkCentre M90t (workstation)
Include key specs and target audience.
Step 3: Format into Dictionary
descriptions = {
"Dell OptiPlex 7010": "[AI generated description here]",
"HP ProBook 450 G9": "[AI generated description here]",
"Lenovo ThinkCentre M90t": "[AI generated description here]",
}
Common Mistakes to Avoid
❌ Wrong - Mismatched Names
descriptions = {
"Dell OptiPlex": "Description..." # Too generic
}
# Excel has: "Dell OptiPlex 7010" - Won't match!
✅ Correct - Exact Match
descriptions = {
"Dell OptiPlex 7010": "Description..." # Exact match
}
❌ Wrong - Missing Quotes
descriptions = {
Dell OptiPlex 7010: "Description..." # Missing quotes on product name
}
✅ Correct - Proper Quotes
descriptions = {
"Dell OptiPlex 7010": "Description..." # Both in quotes
}
❌ Wrong - Missing Comma
descriptions = {
"Product A": "Description A" # Missing comma
"Product B": "Description B"
}
✅ Correct - With Commas
descriptions = {
"Product A": "Description A", # Comma here
"Product B": "Description B" # Last one can skip comma
}
Character Encoding Tips
If you see weird characters like `×` instead of `×`:- Save your Python file as UTF-8 encoding
- In most text editors: File → Save As → Encoding: UTF-8
- Use plain characters if special symbols cause issues
Need Help?
- Check exact product names: They must match your Excel exactly
- Use AI for descriptions: Much faster than writing manually
- Test with 2-3 products first: Verify it works before adding all products
- Check output file: Open it to confirm descriptions look correct
Ready to use? Copy the template that matches your needs and customize it!
DESCRIPTION PY script
Excel Description Filler Script
================================
Automatically fills product descriptions in Excel based on product names.
Instructions:
1. Place this script in the same folder as your Excel file
2. Update the 'path' variable with your Excel filename
3. Update the 'descriptions' dictionary with your products
4. Run: python description.py (Windows) or python3 description.py (Linux)
import pandas as pd
# ============================================================================
# CONFIGURATION SECTION - UPDATE THESE VALUES
# ============================================================================
# STEP 1: Change this to your Excel filename
# Make sure this file is in the SAME folder as this script
path = "251106 netgate selling price.xlsx"
# STEP 2: Add your product descriptions here
# Format: "Exact Product Name": "Description text"
# Product names MUST exactly match the "Item Name" column in your Excel
descriptions = {
"Netgate 8300 TAA": (
"pfSense+ 1U security gateway with Intel Xeon D-1733NT (8-core/16-thread) and Intel AVX-512. "
"Ports: 4×10G SFP+, 4×1G SFP, 3×2.5G RJ-45; PCIe expansion up to 10/25/100G. "
"TAA-compliant hardware; built for medium/large sites, MSPs, and data centers."
),
"Netgate 8300 MAX": (
"High-performance pfSense+ gateway on Intel Xeon D-1733NT (2.0 GHz, 8c/16t, AVX-512). "
"Flexible I/O with 4×10G SFP+, 4×1G SFP, 3×2.5G RJ-45 and PCIe slots for 10/25/100G. "
"Designed for scalable firewall/VPN at campus and enterprise edge."
),
"Netgate 8300 BASE": (
"pfSense+ 1U security gateway powered by Intel Xeon D-1733NT (8c/16t, AVX-512) for accelerated VPN and core firewall throughput. "
"I/O: 4×10G SFP+, 4×1G SFP, 3×2.5G RJ-45 with PCIe expansion for higher-speed NICs."
),
"Netgate 8200 MAX": (
"Fastest Intel Atom-based pfSense+ gateway in a quiet rack-mount chassis. "
"Ideal for remote offices, edge, MSPs, and enterprise networks needing multi-gig firewall/VPN throughput."
),
"Netgate 6100 MAX": (
"Versatile pfSense+ gateway with Intel C3558 (QAT, AES-NI). "
"8 flexible WAN/LAN ports (1G/2.5G/10G) delivering ~18+ Gbps L3 routing; suited for SMB to branch deployments."
),
"Netgate 6100 BASE": (
"pfSense+ gateway using Intel C3558 (QAT, AES-NI) with 8 flexible 1G/2.5G/10G ports. "
"Capable of high-throughput firewall, routing, and VPN for SMB/branch networks."
),
"Netgate 4200 MAX": (
"Silent desktop pfSense+ gateway with four discrete 2.5 GbE LAN ports. "
"Ideal for pro-home/SMB/branch; tested up to ~9 Gbps L3 forwarding (iperf3)."
),
"Netgate 4200 BASE": (
"Compact pfSense+ desktop appliance featuring four 2.5 GbE LAN ports and flexible WAN options. "
"Great for SMB/branch and edge use with multi-gig routing capacity."
),
"Netgate 2100 MAX": (
"pfSense+ desktop gateway for home/remote worker/SMB. "
"Dual-core ARM Cortex-A53 1.2 GHz, 4×1 GbE, up to ~2.2 Gbps routing and ~250 Mbps IPsec VPN."
),
"Netgate 2100 BASE": (
"Compact pfSense+ desktop gateway with Dual-core ARM Cortex-A53 1.2 GHz and 4×1 GbE. "
"Flexible multi-WAN, VPN, and add-on packages for home/SMB/remote sites."
),
"Netgate 1100": (
"Ultra-compact pfSense+ gateway for home and small office. "
"Dual-core ARM Cortex-A53 1.2 GHz, 3×1 GbE; up to ~927 Mbps routing and ~607 Mbps firewall throughput."
),
# ADD MORE PRODUCTS HERE:
# Copy the format above and add your own products
# Example:
# "Your Product Name": (
# "Your product description goes here. "
# "You can split it across multiple lines like this."
# ),
}
# STEP 3 (Optional): Change the output filename if desired
# This is the new file that will be created with descriptions added
output_filename = "webstore_import_with_descriptions.xlsx"
# ============================================================================
# MAIN SCRIPT - DO NOT MODIFY BELOW UNLESS YOU KNOW WHAT YOU'RE DOING
# ============================================================================
# Load the Excel file
# sheet_name=0 means use the first sheet
print(f"Loading Excel file: {path}")
df = pd.read_excel(path, sheet_name=0)
print(f"✓ Loaded {df.shape[0]} rows and {df.shape[1]} columns")
# Function to fill descriptions
def fill_desc(row):
"""
Fills the Description column based on Item Name.
Logic:
1. Get the product name from "Item Name" column
2. Check if "Description" already has content
3. If empty/NaN, look up description in our dictionary
4. If no match found, leave it blank
"""
# Get the Item Name and clean up any extra spaces
name = str(row.get("Item Name", "")).strip()
# Get the existing description (if any)
existing = row.get("Description", "")
# If there's already a valid description, keep it
# This prevents overwriting existing data
if pd.notna(existing) and str(existing).strip():
return existing
# Otherwise, look up the description in our dictionary
# If not found, returns empty string ""
return descriptions.get(name, "")
# Apply the function to every row in the DataFrame
print("\nProcessing descriptions...")
df["Description"] = df.apply(fill_desc, axis=1)
# Count how many descriptions were added
filled_count = df["Description"].notna().sum()
print(f"✓ Filled {filled_count} descriptions")
# Save the updated DataFrame to a new Excel file
print(f"\nSaving to: {output_filename}")
df.to_excel(output_filename, index=False)
print("✓ File saved successfully!")
# Display a preview of the results
print("\n" + "="*80)
print("PREVIEW OF UPDATED DATA:")
print("="*80)
# Show first 10 rows with Item Name and Description columns
if "Item Name" in df.columns and "Description" in df.columns:
preview = df[["Item Name", "Description"]].head(10)
for idx, row in preview.iterrows():
print(f"\n{idx + 1}. {row['Item Name']}")
desc = row['Description']
if pd.notna(desc) and str(desc).strip():
# Truncate long descriptions for display
desc_str = str(desc)
if len(desc_str) > 100:
print(f" {desc_str[:100]}...")
else:
print(f" {desc_str}")
else:
print(" [No description]")
else:
print(df.head(10))
print("\n" + "="*80)
print(f"✓ Complete! Check '{output_filename}' for your updated data.")
print("="*80)