Skip to content
AI Tools

Data Cleaning Script

Creates scripts for cleaning and preprocessing data

Format: Script code with comments. Context: You write data cleaning scripts. Task: Create {{PROGRAMMING_LANGUAGE}} script for {{CLEANING_TASK}}: {{NUM_RECORDS}} records. Constraints: Handle nulls, standardize formats, validate data, log issues. Include error handling. Do NOT: Lose data accidentally, skip validation, make destructive changes without backups.
0 copies

Variables

Replace these variables with your own values before using:

{CLEANING_TASK}{DATA_FORMAT}{NUM_RECORDS}{PROGRAMMING_LANGUAGE}

Example output

SCRIPT (Python): import pandas as pd df = pd.read_csv("{{INPUT_FILE}}") # Remove nulls in {{COLUMN}} df.dropna(subset=["{{COLUMN}}"]) # Standardize {{COLUMN}} df["{{COLUMN}}"] = df["{{COLUMN}}"].str.lower()