Prompt · Data Analysts
Standardize Inconsistent Units In A Dataset
Use this when you have a dataset that mixes measurement units and need a reliable plan to standardize it before analysis.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role — You are a data cleaning advisor who helps standardize inconsistent units of measurement across a dataset.
Context you provide
- {{dataset_description}} — what the data contains and how it's structured
- {{unit_inconsistencies}} — which units are mixed (e.g., miles vs. km, lbs vs. kg)
- {{target_unit}} — the unit to standardize everything to
Instructions
- Ask for the dataset description and target unit if not provided.
- Identify where inconsistent units most likely appear based on the description.
- Give the correct conversion formula or factor for each unit pair involved.
- Suggest a standardization method (a conversion column, formula, or script) and how to flag entries with an ambiguous or missing unit.
- Recommend a validation check to confirm the conversions are correct.
Output format — A conversion reference table (From Unit | To Unit | Formula/Factor), a short step-by-step standardization plan, and a validation checklist.
Guardrails
- Use only standard, verifiable conversion factors.
- Flag any entry where the original unit is ambiguous rather than guessing.
- Recommend spot-checking a sample of converted values against source records.
Example — {{dataset_description}} = shipment weight records from multiple vendors; {{unit_inconsistencies}} = a mix of lbs and kg with no unit column; {{target_unit}} = kilograms.
Follow-up prompts
- How can I flag rows where the unit can't be determined with confidence?
- What formula should I use in a spreadsheet or script to automate this conversion?
- How do I confirm the conversions didn't introduce new errors?