Claude Code for Non-Developers
Working with Data

Exploring Data Files

How to open CSV, Excel, and JSON files in Claude Code and get an instant summary of your data

The data files on your computer

You probably already have data files on your computer. Every time you export a report from your CRM (customer relationship management tool), download a spreadsheet from Google Sheets, or pull numbers out of an analytics platform, you're creating a data file.

Here are the three most common types you'll work with.

CSV files (.csv) are the universal format for data. CSV stands for "comma-separated values." Open one in a text editor and you'll see rows of information with commas between each piece of data. Open the same file in Excel or Google Sheets and it looks like a normal spreadsheet. Most business tools can export to CSV.

Excel files (.xlsx) are spreadsheets created in Microsoft Excel or Google Sheets. They can hold multiple sheets, formatting, and formulas. Claude Code can read these, though CSV is often easier to work with.

JSON files (.json) are a structured text format common in web tools and software. If you've ever downloaded data from a web service or analytics platform, it was probably JSON. It looks like nested text with curly braces and brackets. You don't need to understand the format. Claude Code does.

There are other data formats out there, but CSV, Excel, and JSON cover nearly everything you'll encounter in business work.

Setting up a data project folder

Before you start analyzing data, put your files in a dedicated folder. This keeps things organized and makes sure Claude Code can find everything.

Create a folder on your computer, something like sales-analysis or q1-data-review. Copy the data files you want to analyze into that folder.

Then open your terminal, use cd to move into that folder, and start Claude Code:

cd ~/Documents/sales-analysis
claude

Now Claude Code is looking at that folder and everything in it. Any data file you placed there is ready to explore.

Tip: Always work on copies of your data files, not the originals. Copy the files into your project folder rather than moving them. That way, your original data is safe no matter what.

Your first data question

Say you have a file called customer_orders.csv that you exported from your CRM. You're not sure exactly what's in it. How many records? What columns? Is the data complete?

Type this:

Summarize the file customer_orders.csv. How many rows does it have, what columns are in it, and is any data missing?

Claude Code reads the file and gives you something like this:

The file customer_orders.csv contains 2,847 rows and 12 columns:

- order_id: unique identifier for each order (no missing values)
- customer_name: name of the customer (3 missing values)
- email: customer email address (15 missing values)
- order_date: date the order was placed (no missing values)
- product: product name (no missing values)
- quantity: number of items ordered (no missing values)
- unit_price: price per item (no missing values)
- total: order total (no missing values)
- region: sales region (8 missing values)
- status: order status - Shipped, Pending, Cancelled (no missing values)
- payment_method: Credit Card, PayPal, Bank Transfer (2 missing values)
- notes: free-text notes (1,204 missing values - this field is often left blank)

Overall: 2,847 orders across 12 columns. Most data is complete.
The notes column is only about 58% filled, which is normal for an
optional field. The 8 missing region values and 15 missing emails
might be worth cleaning up.

In about ten seconds, you know more about this file than you would after five minutes of scrolling in Excel.

What happened behind the scenes

Here's something worth understanding, even though you never need to do it yourself.

When you asked Claude Code to summarize that CSV, it didn't just "read" the file the way you'd read a book. It wrote a short Python script behind the scenes, using a data analysis tool called pandas. That script loaded the file, counted the rows, checked each column for missing values, and formatted the results. Claude Code ran it on your computer, read the output, and showed you the answer.

You never see the script. You never need to understand it. But knowing this explains why Claude Code behaves the way it does with data.

It takes a moment to respond because it's writing and running a program, not scanning text. A few seconds of wait time is normal.

The first time you analyze data, Claude Code may need to install pandas or another data tool. It will ask your permission first. Say yes. These are standard, widely-used tools.

And because the script runs on your machine, there's no file size limit. A file with 100,000 rows works the same as one with 100 rows, as long as your computer has enough memory.

How this compares to uploading files to ChatGPT or Claude.ai

If you've used ChatGPT or Claude.ai (the web version), you've probably uploaded files to ask questions about them. Claude Code works differently, and the differences matter when you're doing data work.

With web tools, you drag a file into a browser window, wait for it to upload, and then ask questions. ChatGPT limits uploaded files to 512 MB. Claude.ai's web version caps at 30 MB per file. Start a new chat and you have to upload the file all over again.

Claude Code skips all of that. Your files are already on your computer, sitting in your project folder. Claude Code reads them directly. No uploading, no size limits, no re-uploading when you start a new conversation. If your computer can open the file, Claude Code can work with it.

You can also work with multiple files at once. Web tools limit how many files you can reference in a single conversation. Claude Code can see every file in your project folder, whether that's ten files or fifty.

One more difference worth knowing: your raw data files never leave your machine. The data processing happens locally. However, the results of that processing (summaries, numbers, data snippets) do get sent to Anthropic's servers as part of the conversation, so Claude Code can format its answer.

Heads up: Your raw data files stay on your computer, but anything Claude Code writes in its response travels to Anthropic's servers. If your data contains sensitive information (personal health records, financial account numbers), check your company's policy before using any AI tool with it.

Exploring different file types

The approach works the same regardless of the file type.

If you have an Excel file with multiple sheets, ask Claude Code what's in it:

Open the file quarterly_report.xlsx. What sheets does it have, and how
many rows are in each one?

Claude Code lists all the sheets and summarizes each one.

JSON files work the same way, even though they're harder to read on your own:

Read the file analytics_export.json and tell me what's in it. How many
records are there and what fields does each record have?

Claude Code flattens the nested structure and tells you what you're working with.

You can even hand it a file when you're not sure what format the data is in:

What kind of file is data_dump.txt? Can you read it and tell me what
format the data is in?

Claude Code figures out the format and summarizes the contents, even if the file extension doesn't match the actual data inside.

Quick exploration prompts

Here are prompts you can reuse any time you get a new data file:

What you want to knowWhat to type
Basic overview"Summarize this file. How many rows, what columns, any missing data?"
First few records"Show me the first 10 rows of this file"
Column types"What kind of data is in each column? Numbers, text, dates?"
Unique values"What are the unique values in the status column?"
Date range"What's the earliest and latest date in the order_date column?"
Data quality"Are there any obvious data quality problems in this file?"

These prompts work with CSV, Excel, and JSON files. Start with one of these, then follow up with more specific questions based on what you find.

Next, you'll move from "what's in this file" to "what does this data tell me," asking real business questions about your data.

On this page