You've got a messy CSV, a deadline, and a nagging feeling that the data holds answers you can't see. Sound familiar? The gap between raw data and actionable insight is where most analysts lose their edge—and where AI can become your secret weapon. This collection of 12 battle-tested prompts isn't about replacing your brain; it's about amplifying it. From cleaning dirty datasets to building predictive models, these prompts are designed to work with tools like Python, pandas, and even AI-powered platforms (like ASI Biont) that execute code for you. Let's turn your data chaos into structure.
1. The Data Cleaning Whiz: From Garbage to Gold
When to use: You've inherited a dataset with missing values, inconsistent formats, or outliers that make no sense.
The prompt:
Act as a senior data analyst. I have a pandas DataFrame with columns [list columns]. The data has [describe issues: missing values, duplicates, inconsistent strings]. Write Python code to:
1. Detect and handle missing values (mean/median/mode imputation or drop, with justification)
2. Remove duplicate rows based on [key columns]
3. Standardize string formats (e.g., dates to YYYY-MM-DD, lowercase strings)
4. Identify and treat outliers using IQR or Z-score (explain your choice)
Print summary statistics before and after cleaning. Assume pandas and numpy are installed.
Example: For a sales dataset with missing revenue and inconsistent dates, this prompt generates code that imputes revenue by region, parses dates, and flags outliers—giving you a clean DataFrame ready for analysis.
2. The EDA Maestro: Understanding Your Data's Story
When to use: You need a comprehensive exploratory data analysis (EDA) report without writing every line manually.
The prompt:
Act as a data scientist. Perform a thorough EDA on the DataFrame df with columns [list]. Generate Python code that outputs:
- Summary statistics (mean, median, std, quartiles) for numeric columns
- Frequency tables for categorical columns
- Correlation matrix heatmap (use seaborn)
- Box plots for top 5 numeric columns to spot outliers
- Pairplot for selected features
Include comments explaining each visualization. Use matplotlib and seaborn.
Example: For a customer churn dataset, this prompt produces code that reveals age and tenure as key churn predictors, guiding your next steps.
3. The Feature Engineering Alchemist: Creating Gold from Base Metals
When to use: You need new features to improve model accuracy but don't know where to start.
The prompt:
Act as a feature engineering expert. For a dataset with columns [list] and target variable [target], suggest and implement 5 new features using Python/pandas. Consider:
- Date-based features (e.g., day of week, month, time since last event)
- Aggregations (e.g., mean, sum, count per category)
- Binning or scaling for numeric columns
- Interaction terms between [feature1] and [feature2]
Write code with clear variable names and print feature importance (if using a tree model).
Example: In a retail dataset, this prompt creates features like 'recency' and 'frequency' from purchase history, which often boost churn model performance.
4. The Visualization Virtuoso: Charts That Speak Volumes
When to use: You need compelling, publication-ready charts for a report or presentation.
The prompt:
Act as a data visualization expert. Using matplotlib and seaborn, create 4 charts that best represent the following insights from my data: [list insights]. For each chart, specify the chart type, columns used, and include customizations: color palette, labels, titles, annotations. Save each chart as a high-res PNG. Provide code and a brief explanation of why each chart is effective.
Example: For an e-commerce report, this prompt generates a bar chart of sales by category, a line chart of monthly revenue, a heatmap of purchase patterns by hour/day, and a box plot of order values by region—all with proper styling.
5. The Statistical Sherpa: Hypothesis Testing Made Easy
When to use: You need to validate a hypothesis (e.g., "does a new feature increase user engagement?") with rigorous statistics.
The prompt:
Act as a statistician. I want to test the hypothesis: [statement]. The data is in df with columns [group_col] and [metric_col]. Write Python code to:
1. Check assumptions (normality with Shapiro-Wilk, homogeneity of variances with Levene)
2. Choose the appropriate test (t-test, Mann-Whitney U, ANOVA, etc.) with justification
3. Run the test and report p-value, effect size (Cohen's d), and 95% confidence interval
4. Interpret the results in plain English
Example: For an A/B test on a landing page, this prompt runs a two-sample t-test, reports a p-value of 0.03, and explains that the variation significantly outperforms the control.
6. The Model Builder Extraordinaire: From Baseline to Champion
When to use: You need a predictive model with proper evaluation, not just a random sklearn call.
The prompt:
Act as a machine learning engineer. Build a classification/regression model for target [target] using features [list]. Write Python code that:
1. Splits data (train/test with stratify if classification)
2. Trains 3 algorithms: [e.g., Logistic Regression, Random Forest, XGBoost]
3. Performs cross-validation (5-fold) and reports mean accuracy/RMSE
4. Tunes hyperparameters for the best model using GridSearchCV
5. Evaluates on test set with metrics [accuracy, precision, recall, F1, ROC-AUC] and prints a confusion matrix
Provide the final model and feature importance.
Example: For predicting customer churn, this prompt trains several models, finds XGBoost performs best (AUC=0.87), and reveals key churn indicators.
7. The Time Series Prophet: Forecasting with Confidence
When to use: You need to forecast sales, website traffic, or any time-dependent metric.
The prompt:
Act as a time series analyst. Using the data in df with date column [date_col] and value column [value_col], write Python code to:
1. Decompose the series into trend, seasonality, and residuals (use statsmodels)
2. Check stationarity with ADF test and apply differencing if needed
3. Build an ARIMA model (or Prophet) and fit it
4. Forecast the next [N] periods and plot the forecast with confidence intervals
5. Report MAE and RMSE on a holdout set
Example: For monthly revenue data, this prompt fits an ARIMA(1,1,1) model, forecasts 12 months ahead, and shows a clear seasonal pattern.
8. The Data Storyteller: Turning Numbers into Narratives
When to use: You have analysis results but need help crafting a compelling narrative for stakeholders.
The prompt:
Act as a data storyteller. I have the following findings from my analysis: [list findings with numbers]. Write a structured narrative for a non-technical audience that:
1. Starts with a hook (a surprising insight or question)
2. Explains the context and data sources
3. Presents key findings with visual descriptions (e.g., "a bar chart shows...")
4. Ends with actionable recommendations
Keep it under 500 words and use analogies where possible.
Example: For a sales decline analysis, this prompt crafts a story that starts with "Why did our Q3 sales drop 20%?" and leads to recommendations like "focus on retention in the 25-34 age group."
9. The SQL Polisher: From Messy Queries to Efficiency
When to use: You have a slow or convoluted SQL query and want it optimized.
The prompt:
Act as a SQL expert. Here is a query that runs slowly: [paste query]. Rewrite it to improve performance by:
- Using appropriate JOINs instead of subqueries if beneficial
- Adding indexes (if applicable)
- Simplifying WHERE clauses
- Using window functions for aggregations if needed
Explain each change and how it impacts performance. Provide the final query.
Example: A query with multiple nested subqueries gets rewritten with a LEFT JOIN and a window function, cutting execution time from 10 seconds to 0.5 seconds.
10. The Data Pipeline Builder: Automating the Grind
When to use: You need to automate a repetitive data processing workflow (e.g., daily report generation).
The prompt:
Act as a data engineer. Write a Python script that automates the following steps:
1. Read data from [source: CSV, API, SQL database]
2. Clean and transform it [describe transformations]
3. Save the output to [destination: CSV, database]
4. Schedule the script to run daily (provide cron expression or schedule library)
Include error handling (try/except) and logging. Use pandas and requests if needed.
Example: A script that pulls sales data from an API, cleans it, and writes to a local database, with a cron job set for 6 AM daily.
11. The Anomaly Detector: Finding Needles in Haystacks
When to use: You suspect unusual patterns (fraud, system failures) in your data but can't spot them manually.
The prompt:
Act as an anomaly detection specialist. Using the data in df with columns [list], write Python code to detect anomalies:
1. Use Isolation Forest and/or DBSCAN to identify outliers
2. Visualize anomalies with a scatter plot (highlighting them)
3. For time series, use PyOD or Prophet to detect spikes
4. Print the number of anomalies and their index positions
Explain the parameters you chose and why.
Example: In credit card transaction data, this prompt finds fraudulent transactions that deviate from normal spending patterns, flagging them for review.
12. The Report Generator: Insights in Minutes
When to use: You need a comprehensive report (PDF or Markdown) summarizing your analysis for stakeholders.
The prompt:
Act as a data analyst. Generate a Markdown report with the following sections:
1. Executive Summary (3-5 bullet points)
2. Data Overview (shape, columns, basic stats)
3. Key Findings (with tables and charts descriptions)
4. Recommendations (actionable)
Include code snippets that generate the charts (matplotlib) and tables (pandas). The report should be self-contained and ready to share.
Example: A sales analyst uses this to create a weekly report that includes a bar chart of top products and a table of regional performance, saving hours of manual work.
Your Data, Your Superpowers
These 12 prompts are more than shortcuts—they're a mindset shift. Instead of wrestling with syntax, you focus on the strategic thinking: what to ask, which analysis to run, and how to interpret results. AI handles the heavy lifting, but you remain the conductor of the orchestra. Start with one prompt that solves your biggest pain point, customize it to your data, and watch your productivity soar. The future of data analysis is human-AI collaboration, and you're already one step ahead. Now go transform your chaos into clarity!
Comments