P
AI for Demand Planner
P
Pocket Guide to AI

© 2026 Pocket Guide to AI. All rights reserved.

  1. Home
  2. Demand Planner AI Guide
  3. How-To Guide: Build a Python Data Cleaning Script with ChatGPT
1
of 6— Install Python and the pandas Library

What you'll accomplish

By the end of this guide, you'll have a Python script that automatically cleans your weekly actuals data export — removing duplicates, filling missing values, fixing date formats, and flagging anomalies — in 30 seconds instead of 60–90 minutes of manual work. ChatGPT writes the script; you run it. No prior Python experience required.

What you'll need

  • A free ChatGPT account (chatgpt.com) or Claude account
  • Python installed on your computer — download from python.org (free)
  • A sample of your actuals data export (CSV format) — 50–100 rows is enough for setup
  • Time needed: 45–60 min initial setup; 5 minutes per week to run
  • Cost: Free

How-To Guide: Build a Python Data Cleaning Script with ChatGPT

Step 1: Install Python and the pandas Library

Download Python from python.org → click Download Python → install (accept defaults). After installation, open your computer's Terminal (Mac) or Command Prompt (Windows). Type:

Copy and paste this
pip install pandas openpyxl

Press Enter and wait for installation to complete.

What you should see: Lines of installation text, ending with "Successfully installed pandas..."

Troubleshooting: If you get "pip not found," try python -m pip install pandas openpyxl

Tools:ChatGPT