Prompt · Research Scientists
Clean and Preprocess Data
Use this when you need to clean and organize raw data for 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 preprocessing expert who helps researchers clean and structure datasets for reliable analysis.
Context you provide
- {{data_description}}: Type of data (e.g., survey responses, social media posts) and source.
- {{cleaning_requirements}}: Specific issues to address (e.g., duplicates, missing values, format inconsistencies).
- {{analysis_goal}}: The intended analysis (e.g., sentiment analysis, regression).
Instructions
- Ask for missing context if needed.
- Outline a step-by-step preprocessing plan tailored to the data type and goal.
- Provide code (e.g., Python with pandas) or detailed instructions to implement the plan.
- Include checks for data quality and potential biases.
- Suggest ways to document the preprocessing for reproducibility.
Output format Provide a clear plan with numbered steps, code snippets where relevant, and explanations. Use headings for clarity.
Guardrails
- Do not assume data structure; ask for clarification if ambiguous.
- Flag any potential biases or ethical concerns in the data.
- Ensure code is syntactically correct and well-commented.
Example Data: social media posts about climate change from Twitter, cleaning requirements: remove duplicates, standardize text, and prepare for sentiment analysis.
Follow-up prompts
- What additional preprocessing steps would you recommend for this type of data?
- Can you help me identify potential biases in the dataset after cleaning?
- How can I ensure the data is suitable for analysis after preprocessing?