How to Generate Data Analysis with ChatGPT

Aravind Pai Last Updated : 05 Dec, 2024
6 min read

Tired of sifting through mountains of analyzing data without any real insights? ChatGPT, developed by OpenAI, is here to change the game. With its advanced natural language processing capabilities, ChatGPT can uncover hidden patterns and trends in your data that you never thought possible. In this blog post, we’ll explore how ChatGPT can revolutionize your data with exploratory data analysis and transform the way you do business.

In this article, you will discover how ChatGPT’s Advanced Data Analysis feature transforms Exploratory Data Analysis. Learn how ChatGPT Made Analysing Data easier and more efficient, allowing you to gain valuable insights from your datasets seamlessly. Explore the benefits and practical applications of these powerful tools in your data analysis journey.

We’re excited to have Aravindpai with us! With over 6 years of experience in AI and Generative AI, Aravind has a wealth of knowledge, from working with ChatGPT to leading important projects in the field. Their real-world experience and strong background make them a reliable expert. Today, they’ll be sharing how to use ChatGPT for data analysis. Let’s get started!

Data Analysis with ChatGPT

Why Prompts are Critical in ChatGPT?

I realized that prompts are critical in using ChatGPT to its full potential. Even Though ChatGPT can perform any task, we must provide the right and detailed prompts to use it fully. Without the exact prompts, you cannot get the desired results.

I am running the experiment to see if ChatGPT can make sense of the dataset. I know that ChatGPT can provide me with code snippets for certain tasks.

For example, given a prompt, “Help me with the code snippet to check for outliers.” ChatGPT provided me with a code snippet to check and identify the outliers. But can a ChatGPT help me answer questions such as determining the columns that contain outliers in the dataset? or what is the correlation coefficient between the target variable and features?

To answer these questions, ChatGPT has to analyze the specific columns in the dataset and do the math to determine the answer.

Fingers crossed!

But it’s really interesting to see if ChatGPT can do the math and provide me with the exact answers to the questions. Let’s see!

Also read: Understanding ChatGPT and Model Training in Simple Terms

Exploratory Data Analysis (EDA) Using ChatGPT

The Advanced Data Analysis feature offers numerous possibilities, such as data visualization, conducting regressions and various quantitative analyses, and handling different file formats. Let’s try some of the prompts, EDA using ChatGPT:

Prompt 1

I want you to act as a data scientist and analyze the dataset. Provide me with the exact and definitive answer for each question. Do not provide me with the code snippets for the questions. The dataset is provided below. Consider the given dataset for analysis. The first row of the dataset contains the header.

eda using chatgpt-1 | Analyzing Data

Prompt 2

PassengerId, Survived, Pclass, Name, Sex, Age, SibSp, Parch, Ticket, Fare, Cabin, Embarked
1,0,3,”Braund, Mr. Owen Harris”, male,22,1,0, A/5 21171,7.25, S
2,1,1,”Cumings, Mrs. John Bradley (Florence Briggs Thayer)”, female,38,1,0, PC 17599,71.2833, C85,C
3,1,3,”Heikkinen, Miss. Laina”,female,26,0,0,STON/O2. 3101282,7.925,,S
4,1,1,”Futrelle, Mrs. Jacques Heath (Lily May Peel)”, female,35,1,0,113803,53.1, C123,S
5,0,3,”Allen, Mr. William Henry”, male,35,0,0,373450,8.05, S
6,0,3,”Moran, Mr. James”, male,0,0,330877,8.4583, Q

Exploratory Data Analysis using chatgpt-2 | Analyzing Data

Prompt 3

How many rows and columns are present in the dataset?

eda using chatgpt-3

Prompt 4

List down the numerical and categorical columns

 Analyzing Data | eda using chatgpt-4

Prompt 5

Check for NANs present in the dataset? If yes, print no. of NANs in each column. To check for NaNs in a Pandas DataFrame using Python, you can use the ‘isnull()’ function. This function returns a DataFrame of the same shape as the input, where each element is either True or False, indicating whether the corresponding element in the original DataFrame is NaN or not.

Exploratory Data Analysis using chatgpt-5
eda using chatgpt-6 | Analyzing Data

Prompt 6

Are there any outliers in the dataset?

Exploratory Data Analysis using chatgpt 7

Prompt 7

Name the columns that contain the outliers. Provide me with the exact answer.

eda using chatgpt-9

Prompt 8

What are the significant factors that affect the survival rate?

Prompts given for Exploratory Data Analysis

Prompt 9

Determine the columns that follow the skewed distribution and name them.

eda using chatgpt-8 | Analyzing Data

Prompt 10

Generate meaningful insights about the dataset.

EDA

Such cool stuff 🙂 As you can see here, ChatGPT provided me with a summary of valuable insights and also the important factors that might have affected the survival rate.

Here is how you can leverage ChatGPT: Make Money While Sleeping: Side Hustles to Generate Passive Income With ChatGPT

Conclusion

Impressive! advanced data analysis feature in ChatGPT successfully generates meaningful insights . My experiment was successful, and ChatGPT lived up to my expectations.

In this blog post, we’ve delved into the swift advanced data analysis feature in ChatGPT, showcasing its efficient information processing in mere seconds. Our exploration of exploratory data analysis (EDA) has highlighted the crucial role prompts play in ChatGPT, shaping the outcomes of our analytical pursuits. Whether you’re a code interpreter or a data analyst engaged in data analytics, data science, or leveraging GPT-based tools, experimenting with various prompts can yield intriguing results. Consider trying out a few prompts related to machine learning, apps, automation, chatbot, ChatGPT Plus, tutorials, use cases, algorithms, and the advanced data analysis features of ChatGPT. Feel free to share your insights and experiences in the comments below.

Hope you enjoyed reading the article. How have you been experimenting with generative AI tools? Let me know your thoughts in the comment section below.

Frequently Asked Questions

Q1. What is ChatGPT advanced data analysis?

Ans. ChatGPT’s advanced data analysis refers to its ability to intelligently interpret and extract insights from complex datasets using natural language processing. It can perform tasks like text summarization, sentiment analysis, and data-driven report generation. By processing and understanding diverse data formats, ChatGPT enhances decision-making processes and provides valuable insights for informed choices.

Q2. How do I analyze a document in ChatGPT?

Ans. To analyze a CSV document in ChatGPT, provide a concise summary or key points as input. You can experiment with different prompts to elicit insights, queries, or summaries, leveraging ChatGPT’s advanced data analysis and data-driven language understanding capabilities for document analysis. Explore the potential of GPT-4 and large language models (LLMs) within the ChatGPT code interpreter for enhanced document scrutiny.

Q3. Can ChatGPT read and interpret graphs?

Ans. No, ChatGPT cannot directly read or interpret graphs. It processes and generates text based on the input it receives. For a detailed analysis of graphs, a specialized tool or programming language would be more suitable, and the interpreted information can then be communicated to ChatGPT for further discussion or insights.

Q4. Will AI Replace Data Analysts?

Ans. AI is unlikely to replace data analysts entirely but will augment their roles. While AI excels in data processing, analysts provide context, interpret results, and make strategic decisions. A collaborative approach, leveraging AI for routine tasks, prompt engineering, and relying on analysts for interpretation, is the likely future dynamic. Additionally, integrating Python code and SQL into the workflow can enhance overall efficiency. This approach acknowledges the importance of human expertise alongside the capabilities of AI, emphasizing a balanced utilization of both AI, such as ChatGPT code interpreter, and human skills.

Aravind Pai is passionate about building data-driven products for the sports domain. He strongly believes that Sports Analytics is a Game Changer.

Responses From Readers

Clear

Eric
Eric

This is really great, but how do I get a really large data set into ChatGPT? I have an 80MB excel file and need to get insights. Tks, Eric

Brent
Brent

Certainly cool that ChatGPT can do this, but heads up there's EDA tools that can do this (IMHO people tend to reinvent the wheel with simple EDA tasks like this) Packages: R: skimr Python: pandas-profiling (now named ydata-profiling)

We use cookies essential for this site to function well. Please click to help us improve its usefulness with additional cookies. Learn about our use of cookies in our Privacy Policy & Cookies Policy.

Show details