ChatGPT Code Interpreter Simple Data Example
My Bot Making Me Better! Credit Me & MidJourney

ChatGPT Code Interpreter Simple Data Example

Want to use AI to perform data analytics, convert images & create code? 

It’s now even easier to do it!  Open AI has rolled out their newest beta feature, ChatGPT Code Interpreter to their plus members and it’s fantastic!  This article is going to be a simple, step-by-step example of using GPT Code Interpreter (GPT CI) on a basic data set. You will need a ChatGPT Plus account to do this.

So we have to start with all the warnings.  First, always use caution with the data, code & intellectual property that you use with any tool!  Never use anything you wouldn’t share publicly. 

Second, will AI & robots take all our jobs?  I’ve been dreaming about that since 1977 when I first met C-3PO & R2-D2.  Every time I had to vacuum the stairs, do the dishes or clean my room I dreamed of robots taking my job.  Childhood dreams aside, AI & robots are automating and streamlining how work is being done.  We absolutely need to be actively thinking about how we reskill ourselves, teams, communities - especially our kids!  I think previous generations had similar concerns and conversations, but AI & robotics are going to exponentially advance this.

Data Analytics

First, let’s get some basic, public data we can use!  data.world is an amazing resource that we are going to use.  It’s free to setup an account and you have to in order to access the data.  I am using ‘US jobs on Dice.com’ for this example.  The data is six years old (a bit dated) but for this example it really doesn’t matter.  It’s also huge!  22,000+ records.  

data.world - Dice Jobs dataset
data.world - US jobs on Dice - Dataset

We definitely don’t need that many records for this example.  So after I downloaded it, I made a copy and then deleted all but about 500 records to make this example quick & easy.  I didn’t want to have long waits while I experimented with it.

Sample data - showing the different fields
Sample Data - US Jobs on Dice

This dataset has the following data elements: advertiserurl, company, employmenttype_jobstatus, jobdescription, jobid, joblocation_address, jobtitle, postdate, shift, site_name, skills, & uniq_id.

The joblocation_address includes the City, State. Like Atlanta, GA, Chicago, IL & Seattle, WA.

The skills field includes data like (yes - the misspelling is from the data): 

  • SEE BELOW
  • linux/unix, network monitoring, incident response, systems administration, security accessment
  • Enterprise Solutions Architecture, business inteligence, reports, reporting
  • Please see job description
  • Configuration Management, Developer, Linux, Management, Process Engineering, VMware

We are going to use these later.


ChatGPT Code Interpreter

If you are a GPT Plus user, check your settings (lower left - next to your user name - click the …) & enable Code Interpreter in the Beta feature section.  If you don’t see it, they may still be rolling out the feature to all users so give it a day or two.

GPT settings
Turn On Code interpretor in your ChatGPT settings

Next we will upload our file.  Yes, there is a new feature in GPT CI that allows you to upload your file.

No alt text provided for this image

Browse to the file we downloaded.  

Next I wanted to see which locations had the most jobs available.  

No alt text provided for this image

“Create a list of the top job locations and how many jobs are there. Put the data in a table”

Not the most elegant prompt, I know! But GPT started working right away. It’s asks if you would like to see the work - it’s awesome. Here are a few screenshots of what it’s doing for you.

No alt text provided for this image
No alt text provided for this image

Using python pandas to read the data.

And the final output of the data that I uploaded.

No alt text provided for this image

Now I’m curious, what are the top skills for the jobs in Boston.  “List the top 10  skills needed for jobs in Boston”

No alt text provided for this image

I love the note at the bottom - Please note that this analysis is based on the provided data and the actual job market may be different. Additionally, the skills were extracted based on the comma-separated values in the "skills" column of the dataset. If a single entry in this column contained multiple skills (e.g., "Project Management"), those skills would be counted separately.

This analysis is on your data!  

The other cool thing here is all the Python code is now written for you.  You can take the code and now perform this action on a local environment with real data or a bigger data set.  This totally enables you to use test data in GPT CI and then execute locally.  


Next Steps

Play!  Try this out yourself.  Nothing I showed you here was crazy complicated.  But I think that’s the point.  I could do all this myself.  I can setup my Python environment on my computer.  I can clean up the data.  I can write the code.  But I don’t do that all the time and it takes me time to get in the right mindset and get my environment working. I don’t code all the time and I have to search for code samples to help me.  Experiment! Try this!  Share what you figure out!  I’d love to hear what you try.


TLDR (Too Long Didn’t Read)

(Yes I used GPT to create this part!)

OpenAI's latest feature, ChatGPT Code Interpreter, simplifies AI data analytics, image conversion, and code creation. Accessible to ChatGPT Plus members, it provides users the ability to interact with a dataset, perform analytics, and write code based on the user's prompts. The example uses a public data set from data.world, focusing on 'US jobs on Dice.com'. Using GPT Code Interpreter, the dataset can be uploaded, and users can request various analyses, such as identifying locations with the most job openings. The system generates Python code that can be used elsewhere. However, it's crucial to use caution with sensitive data and intellectual property. The broader implication of AI tools such as this is the potential automation of jobs, highlighting the importance of reskilling for the future.

#OpenAI #ChatGPT #CodeInterpreter #AI #DataAnalytics #MachineLearning #Reskilling #FutureOfWork #PythonCoding #AIInnovation #TechNews #Automation (GPT created my hashtags too!)

Private LLMs will be here before we know it. To some degree, they are already here! However, I believe to effectively use private LLMs, the data you provide the tool will need to be clean, robust/comprehensive, and labeled (at scale) properly. I wrote about this here: https://medium.com/@chrisperkins505/the-future-state-data-in-sled-6e632ea8d168

I've been struggling to wrap my head around Code Interpreter for the last few hours. And your mentioning in your article that we need to reskill ourselves got me thinking: Will we always have AI on our heels?

Thank you for sharing this Aaron !

Great article Aaron! I love using ChatGPT and I haven’t even scratched the surface of its capability yet. I’m really happy to see you also addressed the risk to data and IP confidentiality when using LLMs like ChatGPT. Gartner highlights additional risks to be aware of in this article: https://www.gartner.com/en/newsroom/press-releases/2023-05-18-gartner-identifies-six-chatgpt-risks-legal-and-compliance-must-evaluate

To view or add a comment, sign in

Others also viewed

Explore content categories