CLSkills
April 10, 2026Samarth at CLSkills

How to Use Claude for Data Analysis — Upload a Spreadsheet, Get Insights

Practical guide to analyzing CSV and spreadsheet data with Claude. Prompts for summaries, trends, anomalies, and visualizations included.

claudedata analysisspreadsheetscsvbusiness intelligence
📬

Get notified when we discover new Claude codes

We test new prompt commands every week. Join 4+ developers getting them in their inbox.

How to Use Claude for Data Analysis — Upload a Spreadsheet, Get Insights

You have a spreadsheet with 5,000 rows of sales data and your manager wants insights by end of day. You could spend three hours building pivot tables and charts in Excel. Or you could upload the file to Claude and have a comprehensive analysis in five minutes.

Claude Opus 4.6 and Sonnet 4.6 can both read CSV files, understand tabular data, write analysis code, and explain findings in plain English. Here is how to get the most out of this capability.

Step 1: Upload and Understand Your Data

Before asking for insights, let Claude examine the dataset and confirm it understands the structure. This prevents hallucinated column names and wrong assumptions.

I have uploaded a CSV file. Before we analyze it, please:

1. List all column names and their data types (numeric, text, date, boolean)
2. Show the first 5 rows as a formatted table
3. For each numeric column: min, max, mean, median, and count of missing values
4. For each text column: number of unique values and the top 5 most common
5. For date columns: the date range covered
6. Flag any data quality issues you notice (missing values, inconsistent formats, obvious outliers)

Do not start analyzing trends yet. Just help me understand what I am working with.

This step catches problems early. If a column called "Revenue" has string values like "$1,234" instead of numbers, Claude flags it now rather than producing wrong calculations later.

Step 2: The Executive Summary Prompt

Once you understand the data, this prompt gives you the kind of analysis that impresses managers:

Analyze this dataset and produce an executive summary with these sections:

## Key Metrics
- Total, average, and median for the main numeric columns
- Percentage changes or growth rates where applicable

## Top Findings
- The 3-5 most important patterns or insights in the data
- Each finding should include the specific numbers
- Rank by business impact, not statistical significance

## Anomalies and Concerns
- Any data points that are unusual or unexpected
- Trends that are moving in a concerning direction

## Recommendations
- 2-3 specific actions based on the data
- Each recommendation tied to a specific finding

Write this for a non-technical audience. No jargon. Use plain language and round numbers where appropriate.

The instruction to rank by business impact is important. Without it, Claude tends to lead with whatever is most statistically interesting, which is not always what the business cares about.

Step 3: Ask Specific Questions

After the overview, drill into specifics. Here are templates for the most common analysis questions:

Trend Analysis

Using the [DATE COLUMN] and [METRIC COLUMN]:
1. Show the month-over-month trend for the past 12 months
2. Calculate the growth rate for each month
3. Identify which months had the biggest positive and negative changes
4. Is there a seasonal pattern? If so, describe it.
5. Project the next 3 months based on the current trend (with a caveat about the projection's limitations)

Segment Comparison

Break down [METRIC] by [CATEGORY COLUMN]. For each segment:
1. Total and average [METRIC]
2. Percentage of overall total
3. Growth trend (improving, declining, or flat)
4. Which segment is the biggest opportunity for improvement and why?

Sort by [METRIC] descending. Highlight any segment that is significantly above or below average.

Correlation Discovery

Examine the relationships between these columns: [LIST COLUMNS]

1. Which pairs of variables are most strongly correlated?
2. Are there any surprising correlations (or surprising lack of correlation)?
3. For the strongest correlations, is this likely causal or coincidental? Explain your reasoning.
4. Create a simple narrative: what story does this data tell about how [BUSINESS PROCESS] works?

Important: Do not overstate correlations. If the relationship is weak, say so.

Anomaly Detection

Scan the dataset for anomalies:

1. Individual rows where any value is more than 3 standard deviations from the mean for that column
2. Time periods where metrics changed by more than 30% compared to the previous period
3. Segments or categories that behave very differently from the overall pattern
4. Any data that looks like it could be an entry error (e.g., negative values where only positive make sense)

For each anomaly, provide the specific row/value and a hypothesis for what might have caused it.

Step 4: Generate Visualizations

Claude can write code to create charts. Here is a prompt that produces clean, presentation-ready visualizations:

Write Python code using matplotlib and pandas to create the following charts from this dataset:

1. Line chart showing [METRIC] over time (monthly)
2. Bar chart comparing [METRIC] across [CATEGORIES], sorted descending
3. Scatter plot of [COLUMN A] vs [COLUMN B] with a trend line

Formatting requirements:
- Clean, professional style (no default matplotlib look)
- Include chart titles and axis labels
- Use a consistent color palette
- Add data labels on the bars
- Set figure size to (10, 6) for each chart
- Save each chart as a PNG file

Use this code style: comments explaining each step, variables with clear names.

If you are using Claude's code execution feature, the charts render directly in the conversation. Otherwise, copy the code into a Jupyter notebook or Google Colab.

Step 5: The Comparison Analysis

When you need to compare two time periods or two datasets:

Compare these two periods in the dataset:
- Period A: [DATE RANGE 1]
- Period B: [DATE RANGE 2]

For each key metric:
1. The value in Period A and Period B
2. Absolute change and percentage change
3. Whether the change is statistically meaningful or within normal variation

Then answer: What changed between these periods and what is the most likely explanation based on the data?

Working With Large Datasets

Claude's context window is large but not infinite. For datasets over 10,000 rows, use these strategies:

Upload a sample first. Give Claude the first 100 rows plus the full column headers. Let it understand the structure, then ask it to write analysis code you can run on the full dataset locally.

Pre-aggregate. If you have daily data over 3 years, aggregate to monthly before uploading. You lose granularity but gain the ability to analyze the full picture.

Ask Claude to write the code. For very large datasets, the best approach is to have Claude write pandas or SQL code that you run against the full dataset.

Here is a sample of my dataset (first 50 rows) and the full column schema.
Write a complete Python script using pandas that:
1. Loads the full CSV file
2. Cleans the data (handle missing values, fix data types)
3. Produces a summary report with [SPECIFIC METRICS]
4. Exports the results to a new CSV

Make the script robust — handle edge cases like empty rows and inconsistent date formats.

Common Pitfalls to Avoid

Do not skip the data understanding step. If Claude misinterprets a column, every subsequent analysis will be wrong.

Verify surprising findings. If Claude says revenue grew 300% in March, double-check the raw data. The finding might be real, or it might be an artifact of dirty data.

Specify your definitions. "Revenue" could mean gross revenue, net revenue, or MRR. "Customer" could mean unique accounts or individual users. Tell Claude which definition you are using.

Remember that Claude cannot access external data. It analyzes what you give it. If your spreadsheet is missing context (like industry benchmarks or the marketing spend that drove those sales), the analysis will be limited.

For more data analysis prompts, including templates for financial analysis, customer segmentation, and survey data, check our prompt collection. Our complete guide covers which Claude model works best for different types of analysis tasks.

Start With One Spreadsheet

Open the CSV you have been meaning to analyze. Upload it to Claude. Paste the Step 1 prompt. In five minutes, you will have a clearer understanding of your data than you would get from an hour of manual exploration. That is the practical power of AI-assisted analysis — not replacing your judgment, but giving you a faster path to the numbers that inform it.

One email a week. Zero fluff.

New Claude Code skills, hidden prompt codes, and tested workflows — straight to your inbox. No spam, unsubscribe in 1 click.