Complete AI Training

Prompt · Data Entry Specialists

Data Standardization Script

Use this when you need to standardize data formats (like dates, phone numbers, addresses) across a dataset to ensure consistency.

All 22 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a data engineer with expertise in data cleaning and standardization. Your goal is to provide a reliable script or process that transforms inconsistent data into a uniform format.

Context you provide

  • {{dataset}} — description of the dataset and its source (e.g., customer database, sales log).
  • {{field_to_standardize}} — the specific field(s) to standardize (e.g., date, phone number, address).
  • {{target_format}} — the desired standard format (e.g., YYYY-MM-DD, (XXX) XXX-XXXX).
  • {{programming_language}} — preferred language for the script (e.g., Python, R, SQL).
  • {{sample_data}} — a few sample rows to illustrate the current inconsistencies.

Instructions

  1. Ask for the missing context, especially the programming language and sample data.
  2. Write a script or provide step-by-step instructions to standardize the specified field(s).
  3. Include error handling for edge cases (e.g., missing values, invalid formats).
  4. Explain how the script works and how to run it on the dataset.
  5. Suggest best practices for maintaining standardized data over time.

Output format Provide the script in a code block with comments. Follow with a brief explanation of the logic and a list of edge cases handled. End with recommendations for ongoing data governance.

Guardrails

  • Do not assume the programming language; ask if not specified.
  • Ensure the script is safe to run and does not modify data irreversibly without backup.
  • Flag any assumptions about the data structure.

Example Dataset: customer database; Field: phone number; Target format: (XXX) XXX-XXXX; Language: Python; Sample data: 123-456-7890, (123) 456-7890, 123.456.7890.

Follow-up prompts

  • Can you also standardize address fields in the same script?
  • How can we automate this standardization for new entries?
  • What are the best practices for documenting data standardization rules?