ChatGPT’s Agent feature is now available to all Plus users! In this article, we explore three data science use cases where ChatGPT Agents can simplify Data Scientist tasks like data visualization, machine learning, and web scraping
I wanted to write this right after OpenAI released Agents, but I had to wait until they opened it up to all Plus subscribers. Still, it was worth the wait!
ChatGPT Agents can automate Data Science-related tasks with the power of AI.
Automating Data Exploration and Data Visualization
Photo by Stephen Phillips - Hostreviews.co.uk on Unsplash
With a simple prompt, ChatGPT Agent can generate a complete data visualization and data exploration workflow. It works similarly to CLI tools like Claude Code or Gemini CLI, but ChatGPT Agent is fully automated.
Bıild a streamlit app with separate tabs for data exploration and visualization, which automates both processes. Test it using a BTC price dataset.
Let’s see what the agent will do.
Terminal view: ChatGPT Agent installs Streamlit for a data-analysis dashboard in seconds, no manual code.
Here is the source of the BTC price dataset.
In 2 minutes, it attached the streamlit file.
Two-minute result: OpenAI ChatGPT Agent delivers a Streamlit script for Bitcoin data-visualization.
Download this Python file, save it, and run this code.
streamlit run streamlit_app.py
Streamlit dashboard of Bitcoin prices auto-generated by a ChatGPT Agent
It is not perfect, but since I didn't create this code manually, I can say it is good enough for the first iteration. However, I must say that Claude Code was better in the first iteration.
Building a Machine Learning Model on Crypto Prices
Reference to this Dataset: https://www.kaggle.com/datasets/kapturovalexander/bitcoin-and-ethereum-prices-from-start-to-2023
To let ChatGPT’s Agent build a machine learning model, I used a dataset from Kaggle that includes decades of BTC and ETH prices. I uploaded both the dataset and a Jupyter notebook with this prompt:
Build a machine learning model to predict prices by using attached dataset and jupyter notebook.
Honestly, you don’t even need to upload the notebook; ChatGPT handled the task directly in the terminal.
Terminal output showing ChatGPT Agent training a crypto-price prediction model on BTC & ETH data
Every time I write about ChatGPT, it feels like I’m promoting it. But the tools are so impressive, I just can’t help it.
A few years ago, creating a model like this would’ve taken us data scientists hours, searching documentation, and trying different libraries. Now? It took about one minute. Here is the full output;
ML model built by ChatGPT Agent
Was it perfect? No. But it’s a solid first step. From here, you can ask the Agent to improve the model, apply feature engineering, or explore different algorithms.
Web Scraping from Medium
Photo by Santhosh Addala on Unsplash
Three years ago, I wrote an article compiling every TDS article published that year. It took me weeks to finish. So naturally, when I saw what Agents could do, I had to try automating that process.
Let’s scrape Medium. Who wouldn’t want to write a viral article, right? Maybe this data will help. Here’s the prompt I used:
I want you to collect information from here : https://medium.com/tag/artificial-intelligence/recommended, we can say 200 latest article and save it to the csv
The Agent began working on it.
ChatGPT Agent attempts user-agent bypass while scraping Medium, and AI automates data collection tasks.
I remembered how long it took me to scrape the 2022 TDS articles. I wasn’t good at web scraping back then, and it was painful. Unsurprisingly, the Agent couldn’t access the page directly.
It could not.
Medium AI-tag page preview: dataset source for ChatGPT Agent web-scraping into CSV for data scientists.
But this wouldn’t be in the article if it didn’t work out, right? So I downloaded the page as HTML and uploaded it. And now it’s working on it. Fingers crossed!
Lines of code symbolizing automated scraping of Medium AI articles with ChatGPT Agent
And here it is.
Scraped Medium articles collected by ChatGPT Agent
Here is the file it scrapes.
Spreadsheet listing 200 AI-tagged Medium articles collected by ChatGPT Agent
I am impressed. You can scrape more articles by using the archives of the publications.
Final Thoughts
In this article, we have discovered three different use cases that the ChatGPT agent fully automates. Some of them, such as creating a Streamlit app, can be done with other CLI tools like Claude Code or Gemini CLI.
However, the last one, scraping a website, is impressive and automates web scraping, making it a beginner-level task to do if the user can use an agent. However, if the user can use AI, would they still be considered a beginner?
To reach more of my content, like weekly AI news, other articles, check here. Also, you can discover that our website includes no-code AI tools. Here are free tools.
Here are the free resources.
Here is the ChatGPT cheat sheet.
Here is the Prompt Techniques cheat sheet.
Here is my NumPy cheat sheet.
Here is the source code of the “How to be a Billionaire” data project.
Here is the source code of the “Classification Task with 6 Different Algorithms using Python” data project.
Here is the source code of the “Decision Tree in Energy Efficiency Analysis” data project.
Here is the source code of the “DataDrivenInvestor 2022 Articles Analysis” data project.
“Machine learning is the last invention that humanity will ever need to make.” Nick Bostrom
Here are paid resources.
Here you can create your start-up ideas.
Here is our Substack page.
Originally published at https://medium.com/@geencay.