Using AI for Data Analysis
March 20, 2026
AI tools have made data analysis accessible to anyone — not just analysts and data scientists. Here's how to explore, visualize, and draw conclusions from data using AI.
The Old Way vs. the AI Way
Traditional data analysis required writing Python or R, knowing SQL, or mastering tools like Excel pivot tables. AI tools haven't replaced those skills for complex work — but they've dramatically lowered the floor. If you have data and a question, you can now get answers without being a specialist.
Tool Options
ChatGPT Code Interpreter (Advanced Data Analysis)
The easiest starting point. Upload a file, ask questions in plain English, and ChatGPT writes and executes Python code on your behalf.
Supported formats: CSV, Excel, JSON, PDF, images
Example workflow:
- Upload a CSV of your monthly sales data
- "What were the top 5 products by revenue last quarter?"
- "Show me a bar chart of monthly sales with a trend line."
- "Are there any months that look like outliers?"
Claude with Files
Similar capability — paste data or upload files and ask analytical questions. Claude tends to be stronger at interpreting results in context and explaining why a pattern matters, not just what it is.
Jupyter AI
For analysts who already work in notebooks, the jupyter_ai package adds a %%ai magic command and a chat sidebar. You can ask it to:
- Explain a cell's code
- Fix an error
- Generate a new analysis cell based on your description
%pip install jupyter_ai anthropic
Then in your notebook:
%%ai anthropic:claude-opus-4-7
Load the dataframe called df and create a seaborn heatmap
of correlations between all numeric columns
SQL + AI
If your data lives in a database, you can describe queries in natural language:
"Show me all customers who made more than 3 purchases in the last 90 days but haven't bought anything in the last 30 days."
Tools that support natural language to SQL:
- Outerbase — Visual database interface with AI query generation
- DataGrip AI Assistant — In-IDE AI for database work
- DuckDB + Claude — Paste your schema and ask for queries
Practical Techniques
Exploratory Data Analysis (EDA) with AI
Paste a sample of your data (first 20 rows) and ask:
"Describe this dataset. What fields are present, what data types, and what questions could I answer with this data?"
This gives you a map of what's possible before you dive in.
Cleaning Messy Data
Describe the problem:
"My CSV has a date column with inconsistent formats — some are MM/DD/YYYY and some are YYYY-MM-DD. Write Python code to standardize all dates to ISO format."
Creating Visualizations
Be specific about what you're trying to show:
"Create a matplotlib chart showing website traffic by month for 2025. Use a line chart. Highlight months where traffic dropped more than 15% from the previous month in red."
Interpreting Statistical Output
Paste raw statistical output and ask for a plain-language explanation:
"Here's the output from a linear regression model. What does each number mean, and what does this tell me about the relationship between ad spend and sales?"
Working with Real Business Data Safely
Keep a few things in mind when using AI for business data:
- Anonymize before uploading. Replace real customer names, emails, and IDs with fake ones. The patterns you care about are in the aggregates, not the individuals.
- Check your organization's data policy. Some companies restrict uploading data to external AI services.
- Validate outputs. Always sanity-check AI-generated analysis against what you know. If a number seems off, it might be.
A Sample End-to-End Workflow
Here's how to analyze a sales dataset in under 15 minutes using ChatGPT:
- Upload your sales CSV to a ChatGPT conversation.
- Ask for a summary: "Give me a quick overview of this data — row count, date range, total revenue, top product categories."
- Explore trends: "Chart revenue by month. Has growth been consistent?"
- Drill into anomalies: "February looks low. What could explain it — fewer transactions or lower average order value?"
- Get a recommendation: "Based on this data, which product category should I focus on to grow revenue fastest?"
- Export: Ask it to generate Python code you can run later, or paste the charts into your report.
The bottleneck is no longer the analysis — it's knowing what questions to ask.