- The Juicer
- Posts
- How to Use ChatGPT for Data Analysis đ§
How to Use ChatGPT for Data Analysis đ§
(You won't have to deal with Excel again!)
Millions of people know about ChatGPT.
But few know ACTUALLY how to use it for analyzing their data.
(This is pretty evident at my data analyst job, connect with me on LinkedIn.)
In this newsletter, we will explore 5 ways you can use ChatGPT to analyze your data.
Letâs get into it!
Meet your own personal AI Agent, for everythingâŠProxy
Imagine if you had a digital clone to do your tasks for you. Well, meet ProxyâŠ
Last week, Convergence, the London based AI start-up revealed Proxy to the world, the first general AI Agent.
Users are asking things like âBook my trip to Paris and find a restaurant suitable for an interviewâ or âOrder a grocery delivery for me with a custom weekly meal planâ.
You can train it how you choose, so all Proxyâs are different, and personalised to how you teach it. The more you teach it, the more it learns about your personal work flows and begins to automate them.
1. Quick Data Exploration
When you need a quick analysis, ChatGPT can guide you through Exploratory Data Analysis (EDA).
I suggest getting ChatGPT to detail steps for getting an overview, cleaning, analyzing relationships, and generating insights.
Sample Prompt:
I have a dataset (dataset.csv). Please help me conduct a thorough Exploratory Data Analysis (EDA) with the following steps:
Data Overview
Load and preview the data, showing the first few rows, data types, and basic information like row/column counts. Show missing values by column and suggest handling options. Provide summary stats for numerical features and the top categories for categorical ones.Data Cleaning & Types
Confirm or suggest data type conversions, display unique value counts, and flag issues like duplicates or outliers with suggestions for handling them.Univariate Analysis
For numerical data, show histograms and box plots to highlight distributions and outliers. For categorical data, create bar charts showing the frequency of each category.Bivariate & Multivariate Analysis
Generate a correlation matrix and heatmap for numerical features. Use scatter and box plots to visualize relationships between key feature pairs. For categorical features, include cross-tabulations to reveal relationships.Feature Engineering
Recommend new features, transformations for skewed data, or standardization as needed.Key Insights & Recommendations
Summarize trends or patterns, identify major outliers, and suggest modeling approaches and useful preprocessing steps.
2. Optimize SQL Queries
For situations where SQL queries run slowly, ChatGPT can help with query optimizations.
I recommend providing details on your data structure and share your query to receive suggestions for performance improvements.
Sample Prompt:
I have a database and need help optimizing my SQL queries.
Details:
Data Structure: Describe tables, key columns, data types, and relationships or constraints.
Current Query: Paste or describe the query you're currently using.
Optimization Goals:
Provide suggestions for improving performance, like using indexes, rewriting joins, or simplifying aggregations. Demonstrate advanced techniques (subqueries, temporary tables, or window functions) if they apply. Additionally, translate complex calculations or metrics into SQL code that minimizes processing time.
3. Powerful Documentation Writing
ChatGPT can help generate detailed documentation, making it easier for colleagues to understand your code and findings. This includes adding comments, summarizing analyses, and even drafting report structures.
Sample Prompt:
I need help with documenting and summarizing my code and findings for a project. Hereâs what Iâm looking for:
Code Comments and Explanations: Add comments for complex sections to improve readability.
EDA Summary: Generate a concise summary of key findings, patterns, relationships, or anomalies.
Methodology Explanation: Write a description of the analysis methodology, explaining steps taken and rationale.
Report Outline: Create a report outline with sections for introduction, EDA summary, methodology, key insights, and recommendations for next steps.
4. Machine Learning Assistance
When working on machine learning, ChatGPT can assist with algorithm selection, generating code for model training and tuning, and offering tips on data preparation and hyperparameter tuning.
Sample Prompt:
I need assistance with understanding and implementing machine learning algorithms for my project.
Details:
Algorithm Selection and Use Cases: Help me understand which machine learning algorithms are best suited for my use case, with brief explanations.
Implementation Steps: Provide code examples for training, evaluating, and tuning models with libraries like Scikit-Learn, XGBoost, or TensorFlow.
Optimization Tips: Offer guidance on feature selection, data scaling, and hyperparameter tuning to enhance model performance.
Additional Information:
Project Description: Include details about the project, target variable, data structure, and specific goals.
Preferred Libraries: Mention preferred tools, like Scikit-Learn for simpler models or TensorFlow for deep learning.
Evaluation Metrics: Suggest evaluation metrics that align with project goals, such as accuracy, precision, or RMSE.
Learn AI in 5 Minutes a Day
AI Tool Report is one of the fastest-growing and most respected newsletters in the world, with over 550,000 readers from companies like OpenAI, Nvidia, Meta, Microsoft, and more.
Our research team spends hundreds of hours a week summarizing the latest news, and finding you the best opportunities to save time and earn more using AI.
5. Troubleshooting and Debugging
If you encounter errors, ChatGPT can help by analyzing error messages, explaining issues, and suggesting fixes. Provide the error message and a description of the problem for best results.
Sample Prompt:
Iâm encountering an error in my code, and I need help debugging it.
Details:
Error Message: Copy and paste the full error message.
Problem Description: Describe the issue, including what you expected versus whatâs happening.
Code Snippet: Provide the relevant portion of your code where the error occurs.
Request for Assistance:
Could you help me understand whatâs causing this error and suggest solutions or alternatives? If there are best practices or debugging tips for this type of issue, please include them.
Conclusion
ChatGPT can help you with your work so much!
Tune in next week at the same place, same time for more tips on how to use AI for work!
Thatâs all for this week.
See you next time!
Justin Chia
Find me on LinkedIn or shoot me an email at [email protected]
My Complete AI Tech Stack âđ»
I use these tools to automate my daily business processes.
ChatGPT Plus - Powerful AI chatbot with GPT4o model that powers my writing process.
Perplexity - Amazing AI chatbot tool for research.
TubeonAI - AI-powered YouTube video summarizer.
Canva - An easy-to-use design tool with AI built-in.
Beehiiv - Beautiful email marketing platform built for growth (Get a 30-day trial + 20% OFF for 3 months!)
Supergrow - Powerful AI LinkedIn scheduling tool.
Namecheap - Cheap domain name registrar.
Google Workspace - Workspace to store all business documents.
Notion - Flexible workspace to track and build business processes.
Stripe - Trusted automatic billing platform.
When Youâre ReadyâŠ
Letâs work together â here are 2 ways I can help you:
The AI Starter Kit (50% off): My complete beginner resource pack for learning about AI in 2024. I share beginner resources to get started, prompts I use, an AI learning library, and other bonus content.
Promote your company to 7,000+ AI & tech lovers by sponsoring this newsletter.
If you have any questions or feedback, reply to this email. (I'll personally reply! :)
Reply