Skip to content
Mark-t.aiMark-t.ai
Back to Browse
ChatGPTdata-analysis

Data Cleaning Automation Script

4.6(15 reviews)
234 sales

Description

Generate Python/Pandas scripts for common data cleaning tasks. Handles missing values, duplicates, data type conversions, and standardization with reusable code patterns.

Preview

Example Input

Dataset issues: Names in mixed case, phone numbers in various formats, date column has multiple formats, some duplicate emails.

Example Output

## Python Data Cleaning Script\n\n```python\nimport pandas as pd\nimport re\nfrom dateutil import parser\n\ndef clean_dataset(df):\n # Standardize names (Title Case)\n df["name"] = df["name"].str.strip().str.title()\n \n # Standardize phone numbers\n def clean_phone(phone):\n if pd.isna(phone):\n return None\n digits = re.sub(r"\D", "", str(phone))\n if len(digits) == 10:\n return f"({digits[:3]}) {digits[3:6]}-{digits[6:]}"\n return phone\n \n df["phone"] = df["phone"].apply(clean_phone)\n \n # Parse mixed date formats\n def parse_date(date_str):\n try:\n return parser.parse(str(date_str))\n except:\n return None\n \n df["date"] = df["date"].apply(parse_date)\n \n # Remove duplicate emails (keep first)\n df = df.drop_duplicates(subset=["email"], keep="first")\n \n return df\n\n# Usage\ndf_clean = clean_dataset(df)\n```\n\n**Notes:**\n- Install: `pip install python-dateutil`\n- Handles most common edge cases\n- Preserves original data if parsing fails

pythonpandasdata-cleaning

Reviews (15)

Steven R***
Feb 8, 2026

This prompt understands data patterns. The insights are invaluable!

Ryan C****
Feb 2, 2026

Nice prompt for data work. Good balance of depth and clarity.

Ashley Y****
Jan 10, 2026

Essential for data professionals. Saves hours of analysis work.

James W****
Jan 1, 2026

Essential for data professionals. Saves hours of analysis work.

David G****
Nov 21, 2025

This prompt delivers actionable insights. Highly recommended!

Christina C***
Aug 13, 2025

Game-changer for data analysis. The quality is consistently high!

Elizabeth S****
Jun 26, 2025

Perfect for data interpretation. The analysis quality is remarkable.

Rachel J****
Jun 24, 2025

Perfect for data interpretation. The analysis quality is remarkable.

Kevin W****
Jun 17, 2025

This data analysis prompt is exceptional! Clear insights every time.

Michelle E****
Jun 6, 2025

Fantastic for data storytelling. Clear visualizations and insights.

$15.99

FREE with subscription

Learn More →
  • Instant download after purchase
  • Lifetime access
  • 30-day money-back guarantee

About the Seller

Mark-T AI

Member since Feb 15, 2025

Official Mark-T marketplace prompts. Curated collection of high-quality AI prompts for ChatGPT, Claude, Midjourney, DALL-E, Stable Diffusion, and Sora. Trusted by thousands of creators and professionals.