Use ChatGPT Data Analysis to Analyze a Spreadsheet
Data analysis is a ChatGPT feature that was originally called Code Interpreter. While it used to be a separate option that needed to be enabled, it has now been fully integrated into GPT-4. You don’t need to do anything special to use it.
Using the analyst is simple. Start a chat and upload a spreadsheet using the standard paperclip icon. Once the spreadsheet is uploaded, you can ask ChatGPT questions about the spreadsheet: sums, counts, averages, correlations between columns, linear regressions, anything you can think of. As you’d expect, you can get quite complex, and you can include multiple spreadsheets. ChatGPT will write a Python program to analyze your data, and then give you the results as part of the chat.
Here’s a simple example, using a spreadsheet with cost, acceptance rate, and graduation rate for some colleges in the Northeast US. First, the spreadsheet, which was named data.xlsx:
COST | GRADRATE | ACCEPTRATE | NAME |
---|---|---|---|
5084.00 | 95.00 | 4.00 | MIT |
34000.00 | 89.00 | 18.00 | Northeastern |
45000.00 | 89.00 | 60.00 | WPI |
… 20 or so additional lines … |
Prompt: In the file data.xlsx, what is the relationship between graduation and acceptance rate?
ChatGPT: Finished analyzing
The dataset from data.xlsx contains information about different institutions, with columns for COST, GRADRATE (Graduation Rate), ACCEPTRATE (Acceptance Rate), and the NAME of the institution. To understand ...
Get Use ChatGPT Data Analysis to Analyze a Spreadsheet now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.