Extracting insights with ChatGPT data analysis

ChatGPT helps you analyze data and create tables and charts from your files.

Updated: 20 hours ago

Interacting with tables in ChatGPT

After you upload a spreadsheet or a CSV file, you can ask ChatGPT questions about its data. If an interactive preview opens, scroll through the rows and columns to check your data.

A CSV preview shows film titles, release years, and locations. The download and open buttons are in the upper-right corner.

Ask a question in your own words. For example, ask ChatGPT to compare weekday and weekend sales in a table.

ChatGPT compares lemonade stand sales in a table. Weekday sales were $350 and weekend sales were $180.

You can also ask ChatGPT to make a table without uploading a file.

ChatGPT lists each planet’s average distance from the Sun in a table with copy and expand controls.

On the web, hover over a table in a response and select Expand table (the two arrows) to open a larger view.

The Expand table button is next to Copy table above the table.

On the web, open the CSV file from its preview. Select the letter above a column or the number beside a row, then ask a question about the selection. For example, select the Title column and ask which title appears most often. If you can’t select cells, name the column in your message.

Column A is selected in the open spreadsheet. The selected cells appear above the question “Which title appears most often?”

To select a range of cells, drag across them. The number of selected cells appears in the message box.

Cells B2 through D2 are selected. The message box shows 3 cells and a question about their average.

Once you’ve selected the cells, ask ChatGPT what you want to know. For example, ask for the average of the selected values.

Editing and creating tables with ChatGPT

Ask ChatGPT to show a calculation in a new column. For example, ask for each week’s total sales and average daily sales side by side.

A table shows total sales and average daily sales for each week. Week 1 has 481 total sales and an average of 80.17 per day.

To add two columns together, tell ChatGPT which ones to use. For example, ask for a column that combines Friday and Saturday sales for each week.

The Friday + Saturday column shows the combined sales for each week. In Week 1, 94 on Friday plus 86 on Saturday equals 180.

To save the original CSV file, select Download next to the filename in the preview. For a table in a chat response, select Copy table to paste it into another app.

The download button in the CSV preview shows the filename, San Francisco film locations.csv.

Visualizing your data with ChatGPT

After you upload a file, ask ChatGPT to chart your data. If you want a static chart, say so in your request. You can allow ChatGPT to determine the ideal chart type for the dataset, or specify one of our supported chart types in your prompt: line graph, bar chart, pie chart, histograms, scatter plot, box plots (Box-and-Whisker Plots), heat maps, area charts, radar charts, treemaps, bubble charts, and waterfall charts.

Please note that only bar, pie, scatter, and line charts are currently interactive in most cases.

A line chart of daily revenue shows Friday’s value of $53 when you hover over the point.

If you don’t specify a chart type, ChatGPT chooses one based on your data. For example, a bar chart can help you compare weekday and weekend revenue.

A bar chart compares weekday and weekend revenue. The Chart options menu shows View as table and Download as image.

On the web, if the chart has a Chart options menu (•••), select Download as image to save a PNG or View as table to see the values. Other charts have separate download and expand controls in the upper-right corner.

When you’re looking at the table, open the same menu and select View as chart to switch back. To change the colors or labels, describe the change in a message.

The chart data table lists weekday revenue of 350 and weekend revenue of 180. Its menu offers View as chart and Copy table.

Common types of analysis

ChatGPT is trained to perform a variety of data analysis tasks. Some common tasks include:

Anomaly detection and mitigation

When making decisions with data, it’s important to ensure that your source data is as accurate as possible. ChatGPT knows how to identify data which might be missing or incorrect. Common issues ChatGPT can identify and repair include:

  • Missing values

  • Outlier values

  • Duplicate rows

  • Incorrect data types

Start your analysis with a prompt like this: Check this data for common issues.

Once ChatGPT has identified common issues, you can ask it to fix those issues. Depending on the issues encountered, ChatGPT may offer multiple options for you to choose from. If you’re uncertain about the implications of these choices, try asking ChatGPT for more information.

Aggregation and integration

ChatGPT can aggregate large amounts of structured data to help you make sense of information. Some aggregations ChatGPT can perform include:

  • Sums

  • Averages (median, mean, mode)

  • Minimum and maximum values

  • Counts of distinct values

  • Standard deviation

Name the columns you want to analyze or select them if your file preview supports it. For example, try this prompt: Calculate the median and standard deviation for this data.

ChatGPT can also merge multiple datasets together based on shared identifiers.

Let’s say you upload two spreadsheets, one containing customers and one containing purchases. Purchase records are associated with customer records via a customer_id property. ChatGPT knows how to integrate both files into a single dataset so that it can answer questions like "What is the total of all purchases made by customers with a gold plan?”

ChatGPT automatically merges datasets for you when you ask a question where it is required.

Advanced statistical analysis

ChatGPT understands how to perform a wide variety of statistical analyses, and is able to select appropriate techniques based on your requirements. Some types of analyses ChatGPT can perform include:

  • Comparative statistics: This involves comparing different groups or variables to understand their differences or similarities. Techniques include t-tests, ANOVA (Analysis of Variance), and MANOVA (Multivariate Analysis of Variance).

  • Correlation and regression Analysis: These methods assess the relationship between variables. Correlation analysis measures the strength and direction of the relationship, while regression analysis models the relationship to predict outcomes.

  • Time Series analysis: This type of analysis examines data points collected over time to identify trends, cycles, and seasonal effects. Methods include ARIMA (Autoregressive Integrated Moving Average) and Seasonal Decomposition.

You don’t need to be a data scientist to use these techniques! If you’re not sure which technique is most appropriate for your data, try telling ChatGPT what you want to understand, and ask it to recommend the best analysis technique. If you’re not sure how to interpret the output of the analysis, ask ChatGPT to explain it to you. An effective prompt can be: Is there anything notable or unusual about this analysis?

Was this article helpful?