Using ChatGPT Code Interpreter for Data Science

Adele from DataCamp walks through ChatGPT's Code Interpreter for data analysis, using an Airbnb NYC dataset. The tool requires ChatGPT Plus and runs Python code in a sandbox. The demo covers importing data, handling missing values and outliers, creating visualizations, and building an executive report.
Cool, thanks.
Hello everyone and thank you for joining today's webinar. My name is Rhys and I'm going to be your moderator today. We're going to kick off today's session in five minutes or so at the top of the hour. We're just waiting so everyone has a chance to join. In the meanwhile, though, we'd love to hear from you. So let us know where you're joining from using the chat or the comments, depending on where you're watching from. And yeah, tell us something that you'd like to get out of today's webinar or potentially a use case that you'd like to see code interpreter used for. Reminder that today's session is on ChatGPT code interpreter. So. Oh, sorry, on OpenAI's code interpreter. So if you don't have an account, please sign up for one ahead of ahead of time.
Brilliant.
I'll be back to repeat these messages for any new joiner shortly, but until then, enjoy the background music.
Foreign.
And thank you for joining today's webinar. My name is Rhys and I'm going to be your moderator today. We're going to kick off today's session in a couple of minutes or so. We're just waiting so everyone has a chance to join. In the meanwhile though, let us know where you're joining from and something that you'd like to learn from today's webinar. Maybe tell us about a use case that you'd like to see used for the ChatGPT code interpreter. Obviously we will. We will be using the ChatGPT code interpreter today, so if you haven't Already got an OpenAI account, please sign up for one. Although I think if you want to use the code interpreter yourself, you will need A plus membership. So yeah, that's another thing to sort. So yeah, get those sorted if you want to prompt along with us and I'll see you in a couple of minutes when we kick off. Hello everyone and thank you for joining today's webinar. My name is Rhys and I'm going to be your moderator for today's session. We're going to kick off the session pretty imminently. We've just been waiting so everyone has had a chance to join. Keep letting us know where you're joining from using the question box. Loads of people from a variety of locations today, so yeah, great to see so many people and such a. Such a variety of people as well. One thing for me, we're going to be using ChatGPT code interpreter today, so if you don't already have an OpenAI account and potentially a Plus membership, then please get those sorted ahead of time so that you can prompt along with us.
Brilliant.
I think that's about everything from me. So I'll hand over to your host for today's session.
Adele. Adele.
Please take it away.
All right, all right. I think we are live. Hello, hello. Hello, everyone. It's great to see so many people joining from all over the world. Truly honored to see everyone here. I think that just sharing here some of the love that we've been getting in the comments is here. Kusai from Tunisia. Hello. How's it going? Kusai, Harry from George Mason University. We have Neptune, PA From St. Petersburg, Florida, Greg Maffitt from San Diego. We have Nabil from Yemen. Marhaba, Yemen. Marhaba. Nabil, it's great to see you. Honored to be here with you. Constantinos from Cyprus. So people from all over the world joining us today to take a look at using ChatGPT code interpreter for data science. I'm truly honored to be joined by all of you. You know, people from all over the world I see here, Morocco, Italy, Nepal, France, Germany, Houston, Spain. I think all of the continents are covered today. Japan, Indonesia, Nigeria, Colorado. It's truly awesome to see people from all over the world. Hello, everyone. I'm going to share my screen, so you should be able to see my screen shortly. Hopefully you do see my screen. My name is Adele. I am VP of Media at datago. We need to switch it around so I'm going to maximize my screen. Cool. And I'm going to minimize myself. One second. So my name is Adal. I am VP of Media at datacamp and it's really an honor to be joined by all of you today. Today we're going to be covering specifically on using ChatGPT code interpreter for data science tasks, which is a really exciting new plugin for ChatGPT that allows ChatGPT to independently create code and perform code as well as data analysis, which we're going to be focusing on on today here. Maybe covering a bit on the agenda of what we're going to discuss. We're going to Discuss what is ChatGPT code interpreter, how is it different than the regular ChatGPT model? We're going to talk about gaining access to code interpreter, how you can get started today, examples of it in action, and then we're going to talk about how it augments the data science workflow, explore some other use cases of code interpreter, as well as the future of AI assisted Coding augmentation versus automation and a lot more. So with that, let's get started. First, to prompt along, you need to go to chat.OpenAI.com to sign up or sign in to ChatGPT in case you already have it. Note that Code Interpreter is only available for ChatGPT plus subscribers, so you need to be a paying subscriber to ChatGPT, and if you do not have it, you can just follow along. I'm sure you'll get a lot of value out of it. A lot of the prompts that we'll use as well can be used with the regular ChatGPT 3.5 model, so hopefully it will be very useful for you as well. Maybe on first demystifying, what is ChatGPT code interpreter? So Code Interpreter is an experimental version of ChatGPT. It's a plugin, essentially. The OpenAI has the developed that gives ChatGPT access to a Python interpreter in a sandboxed environment and allows you to upload and download files and perform operations on them. It also really improves ChatGPT's logic abilities by providing it the ability to use Python, and that means the ability to perform math, the ability to perform a data analysis task, the ability to perform code, check out the quality of the code, see if there's any errors, and iteratively and recursively improve the quality of the code that's being created. So really helps ChatGPT improve its logic and programming capabilities by helping it execute Python code within the sandbox environment. So this is essentially a nutshell of ChatGPT code interpreter. If you want to gain access to ChatGPT, we're going to show it just shortly right now, but all you need to do is go to your profile on the bottom left and then press on Settings. And then in the beta features, all you need to do is enable Code Interpreter and what that means is you'll be able to have access to that plugin. I think we're going to just fix my screen, apparently, because my screen is not showing. We're going to switch around. Okay, now we're working now. Now we're talking. And then essentially what you're able to do with Code Interpreter turned on is a variety of tasks. So maybe I want to kind of showcase here what happens when chat with Code Interpreter when it comes to improving ChatGPT's logic abilities. So what I'm going to do is. Oops, I'm going to go back here is I'm going to take this prompt. What is the sum of 5,261 8,998, 15, 22,621, et cetera, et cetera. And I'm going to run it with a regular ChatGPT model, right? And then I'm going to run it in a calculator and then I am going to run it in ChatGPT code interpreter. Right. You know, arithmetic, especially annoying arithmetic of like numerous numbers is generally a hard task for large language models like GPT4. But once you combine the ability of executing code and using Python with a tool like ChatGPT, it becomes quite a lot more performant in arithmetic tasks and a lot of logic abilities. So maybe let's take this first prompt here to chatgpt. I'm going to use the regular model here in default, just one second and I'm going to input the prompt. What is the sum here? So we get here 28,612. Now I'm going to also put it in a calculator. So. Let's take it here. So let's look at the numbers 5261, 8998. And we see here it's 25,612. So quite the difference between what ChatGPT 4 with GPT 4 model with ChatGPT and a calculator. So let's just make sure here. Yes, indeed, 25,612. But what happens if we take this exact same prompt and give it instead to ChatGPT code interpreter, which you can find here. So we see ChatGPT is working its magic. Puts the numbers in the list, sums the list and indeed we get the correct number. So this is a really good illustration of how Code interpreter really helps improve ChatGPT's logic abilities. And this is a really simple arithmetic exercise. And if you extend that on, you know, programming tasks, data science, analysis tasks, et cetera, you'll be able to kind of extrapolate a lot more usefulness from a tool like ChatGPT for these types of use cases. So maybe going in as well on gaining access to code interpreter. So if you have ChatGPT plus but you have not yet seen Code interpreter, all you need to do is go here, settings and beta, go to the beta features, and then turn on plugins and code interpreter here as well. So this will help you gain access to IT plugins, you will have access to a lot more third party plugins as well. Maybe there's a live training in the future that we can talk about how to use ChatGPT plugins effectively. But for today, we're going to be focusing on code interpreter. Now with that in mind, let's talk about how we can augment the data science workflow with a tool like ChatGPT code interpreter. So if we look about, you know, the data science workflow in general, what does it look like? It all starts with, you know, data science data collection. We collect data from different sources. We prepare the data, adjust it, clean it, make it ready for analysis. We explore and visualize the data and try to understand patterns from this particular dataset. And sometimes we apply experimentation and prediction, sometimes the the task is exploration. So for example, today we're going to look at the data set and explore it. But oftentimes you have dashboards that need to create, create a report or a repository or a shareable analysis and machine learning task, for example, whether there is modeling or prediction. Finally, like all data science tasks, whether it is, you know, experiment, whether it is machine learning dashboards or creating a report, it all needs to end in a, you know, a report, a presentation or a notebook. You were to call data storytelling the ability to share these insights with audiences. So what we're going to be focusing on today, we're going to be using CHAT GPT code interpreter is in the data preparation side and exploration and visualization. And finally in the data storytelling and communication, we will be slightly using it on creating a shareable analysis. But I think a lot of that is also covered in the exploration visualization. And what we're going to be covering it on especially is an Airbnb data set. So this is Airbnb listings from New York throughout a small period of time. The primary goal is quite open ended. We're going to look at this with fresh eyes, try to understand the data set, derive actionable insights from it all without necessarily coding just by using ChatGPT code interpreter. And then we're going to understand how to use code interpreter in the process. Right? So if you want to check out the data set, the link is here. We have shared the slides, but we also will share the data set directly in the comments if you want to prompt along. And with that, what we're going to start doing is going into ChatGPT code interpreter and start prompting. Now before we start doing that, what I want to share with you is kind of a prompt formula that I like to use for a variety of ChatGPT use cases. Whether that's, you know, creating content, trying to, you know, create an high quality email or using it for coding tasks. This is what I usually use as a Starting point for a formula for ChatGPT. So I want you to act as X. I will explain this in a bit more deep, deep, deeper way. You are performing the task description. You provide a system level boundary, which is here what we call, for example, you know, something that it should not deviate away from. We provide recursion, which here is, you know, think about your tasks deeply while you're doing what you're doing. Then we provide requirements in any kind of task level boundary, like do not include this in your task, or do not, do not provide, do not code an R, for example. So if you want to check out these prompts in a lot more details, highly recommend that you check out this live training that I've hosted on YouTube as well on ChatGPT. Prompt engineering for beginners. We do it across a lot of different use cases. Finance, marketing, sales and coding, and data science and data analysis. What we're going to be using today is a much more simplified formula for prompts, right? So I want you to act as X. You are performing the test description. Here are the requirements and if you need more context, you get more context. So what that means for a data analysis perspective, I want you to act as a data analyst. You are performing data analysis on a data set of Airbnb listings. Perform the following tasks and then we describe what the tasks are and provide more context if needed. So, you know, like any data science or data analysis task, it all starts with data preparation. Ingesting the data, making sure it's high quality, making sure that we clean that particular data set. So maybe let's get started here with data preparation. And ideally what we want to do here is understand, you know, the data, the metadata, what are the different columns, understanding what the column types are, understanding the ways data can be cleaned. You know, oftentimes this is a really great way to augment the data science workflow with a tool like this is that it helps you unearth potential data quality issues. Then we're going to use ChatGPT code interpreter to perform data cleaning tasks. And that means handling missing data, making sure that there's no duplication or categorical data inconsistencies, ensuring that data is of correct type. So let's get started. I'm going to use this prompt. I want you to act as a data analyst. You are performing data analysis on a data set of Airbnb listings. Perform the following tasks, provide a simple description of the columns in this dataset. So I want to understand what the columns are, I want to identify data cleaning issues and surface them to me. So provide me a list of data cleaning issues. Do not perform any data cleaning task without further instructions. So this is a task level boundary. I don't want you to act without my consent or telling me what you're going to do. Identify other ways we can improve the quality of the data set. So I'm going to copy paste this particular prompt. And so here I'm just going to open a new ChatGPT code interpreter. Chat. I'm going to copy paste this prompt and what I'm going to do is I'm going to press this plus button here and I'm going to upload the data set. So it's going to take a couple of minutes. And then I'm just gonna. Yep. And I'm gonna post this. So let's see what ChatGPT does first. It imports the data set using pandas, right? Displays the header of the data set, which is something any data scientist or analyst would do. Here. The data set contains the following columns, ID of the listing. That's correct. Name of the listing that is correct. Host ID the ID of the host that's also correct. Host name the name of the host that's also correct. Neighborhood group. So the group of the neighborhood where the listing is located. The specific neighborhood where the listing is located. The latitude and longitude is correct. Room type, price that's also correct. Minimum nights, number of reviews, last review, reviews per month, calculated host listings, count and availability365, which are all correct. Note this is a data set that is often used quite a few different times in, you know, tutorials, content on the Internet. It's a pretty famous Kaggle data set, so I'm pretty sure ChatGPT has a good understanding of it. And I'm pretty sure that ChatGPT will encounter certain issues if you're providing a completely novel data set it has never seen before. So next, let's identify potential data cleaning issues. We can start by checking for missing values and data types for each column. So here we're looking@data.info right? And what we see here is a general overview of the of the data set and it provides us that particular context based off the data information. We have identified the following data cleaning issues. There are missing values in the name, host name, last review and reviews per month column and the data types. The column is likely a string which seems to represent dates. So that needs to be updated. I agree here. To improve the quality of the data set, we need to handle the missing values. So depending on the Analysis goal, different strategies could be used here. For example, missing name or host name could be replaced with a placeholder like unknown for the last review and reviews per month. If they are crucial to the analysis, imputation techniques could be considered. However, it's also worth noting that last review and reviews per month likely indicate that these listings have not yet received reviews, which is good insight. So another option could be to replace missing reviews per month with 0 and last review could be left as missing or filled with a placeholder date. Then we can handle outliers. So here, for price, minimum nights, number of reviews, reviews per month, there's a lot of different outliers that we'd like to handle. And here, depending on the task, we may want to create feature new features or encode categorical variables. Okay, so what I'm going to do is I'm going to start with the first two. Okay, so can you show me how many missing values are for each column where there are missing values? So here what it did, it counted the missing values. It showed me that for name and host name, we have 16 rows and 21 rows where there are missing values. So I can drop those, given that it's a really small, small amount of rows. Last review and reviews per month, we have 10,052, which kind of confirms that insight that it mentioned that ChatGPT mentioned around. It probably has not received a review. So if you have not received a review and if you get zero reviews per month, you're going to have 100% overlap here. Right. So that confirms it. So here's what we'll handle. So I would like you to handle missing values accordingly. Drop the rows where name and host name are missing for last review, Make missing rows into none. So here we just have. Oh, I accidentally typed enter, but I liked it to do something for reviews per month. Mm. So here it asked me, would you like to perform any cleaning tasks? I would like the reviews per month to be zero. For reviews per month, any missing value should be turned to zero. Huh. Okay, so it seems like, yeah, fill in A has been filled with zero. Okay. So essentially what we have done right now is reviews per month have been turned to zero for the missing values. Last review, they stayed as is as none. Right. And we've dropped the name and host name columns. Now that's on handling missing values. Now, when it comes to handling outliers, Right. I would like it to specifically handle the outliers for price and minimum nights. Right. Because that will help analysis down the line. I would like you to so let's go down here. Handle outliers for price and minimum nights columns. Can you please provide strategies for dealing with outliers? Do not perform any task without further instruction. So I'm getting a lot of questions on how you upload the data. So once you have code interpreter chosen as a model, all you need to do is press this plus button to upload the file. So now we're getting kind of qualitative answers from ChatGPT code interpreter on how to deal with outliers. So outliers are extremely value are deviate from other observations in the data set. They may. So I'm getting questions here as well. What is the error currently in red? I do think that it has to do with outputting the file on the environment of ChatGPT but I don't think it has affected the the the answer or like how the data cleaning has been overwritten on the on the file. So outliers are extreme values that deviate from other observations in the data set. They may indicate variability in data or experimental error. So here are some strategies to handle outliers. Z score the interquartile range A box plot is a method for grappling depicting groups of numerical data through their quartiles. Outliers may be spotted for individual points. So this is not necessarily how to deal with outliers. Removing outliers is easy is is one option. Replacing outliers is option. Transforming variables. Okay, I think what we can do and it provided. Okay, let's visualize the distributions of these columns. Okay, I was going to ask for that. So here what it did is calculate Z scores for price and minimum nights. Then calculate the interquartile range for price and minimum nights. Plot box plots. Okay. And calculate the number of outliers based on z scores and IQR methods. Okay, so here we have boxplot price. Boxplot shows a lot of outliers on the higher end of the price range. Histogram is right skewed due to high prices. That's also here like you see quite a few. These core message identifies 327 the IQR 6605 indeed both. Okay, so how I would like to proceed in this particular situation is I would like to windsorize these particular outliers and what that means replace anything above the 99 percentile or 1 percentile below the 1 percentile with those particular with the upper limit there. So I would like you to winsorize. I hope I'm pronouncing correctly. Winterize the columns, the outliers with the 99 percentile data. Can you show, can you perform that, please? Let's ask nicely. So here it's winds rising, it's Empress. Okay, so it created new columns as well. That's pretty good. I would like to visualize. So here it's sharing the first few rows from the updated data set. So here, just to clarify what it did, it imported the M stats module from SciPy and imported the winsorize function, which essentially what it does is, is takes the 99th percentile, for example, here in this situation, takes any data that is above the 99th percentile cutoff limit for that distribution and replaces it with that maximum value of the 99th percentile. And I have a question here from Omar Pal saying, which I think is really useful to think about. Did ChatGPT provide mention winsorization as a way to deal with possible outliers? No, it has not. And this is where combining subject matter expertise with a tool like ChatGPT is very useful. So here I'm going to ask is, can you visualize the newly created columns in a box block? Okay, it's going to show me the box plot now. And. Cool. I think we've dealt with the outliers relatively well, at least for the purposes of this particular analysis. So would you like to proceed with any other data cleaning task or analysis given the purpose of time here? We still have 30 minutes left, approximately. I'm going to, I'm going to move on to the next task which is. Exploring and visualizing this data set. Right. So I've also provided here a template of a prompt that you can use. Right. And I'm going to use some of this template in my particular prompt that I'm going to ask here. But what I'm going to do is I'm going to ask ChatGPT to create, to answer two questions I have about the three questions I have about the data set, which is what is the average price of Airbnb listings per neighborhood group in New York? How is the data distributed by room type? What is the neighborhood with most listings? Right. And what I'm going to ask it as well is to provide an additional five questions that we think could be relevant for a report. So the most important thing though is I'm going to say do not perform any data analysis without further instructions and me signing off on the, on the questions. So I'm going to first copy paste here. Okay, I think we can move on to analysis now. I would like you to answer following three questions about the data set. So here. 1, 2, 3 Before doing so, here are some additional instructor instructions. Provide at least five questions. Second one I'm going to do not perform any data analysis task without further instructions. Here. What is the correlation between the number of the reviews and the price of a listing? Do cheaper properties tend to have more reviews? I would sync three think so. How does the availability of a listing relate to the price? Are more expensive listings available less often? What is the relationship between the neighborhood of a listing and its review frequency? Are some neighborhoods reviewed more frequently than others? I think we will. That's a useful question. How does the minimum nights requirement relate to the price? Do more expensive listings require longer stays? Are hosts with more listings more likely to have higher priced listings? Once you have reviewed these questions and improved or adjusted them, we can proceed with the analysis. Okay, cool. So what I'm going to do here is I'm going to take one additional question here, which is. The relationship between the neighborhood of a listing and the review frequency. Or actually I'm going to take this one. How does the minimum nights requirement relate to the price? Do more expensive listings require longer stays? So on top of the questions I mentioned, you can also analyze. In total. This means please answer the following questions. So I'm just going to make sure that it does not ignore the previous questions here we asked it of and then. For each question create a sub header. Create a header with an explanation of the answer data visualizations here. I'm going to ask it a wrinkle here as well. And for the visualizations please use the Airbnb color scheme possible. I'm going to ask it to create the visuals with the Airbnb color scheme if it's possible. So let's get started. So it's defining the Airbnb color scheme, I think Question one what is the average price of listings per neighborhood group? So here it is grading that grouped by data. I think it's technically correct. Questions 3 Question 2 How is the price distributed by room type? So we're also going to check that out here. So let's see. Okay, average price of Airbnb listings per neighborhood group in New York. So we have here in the Airbnb color schemes. A relatively good visualization that shows us the average price of listings. Not surprising. Manhattan is more expensive for example, than Queens or in the Bronx distribution of price by room type. So of course private rooms are slightly more expensive than shared rooms, but less expensive than entire homes or apartments. Well visualized relationship between the minimum nights and the Price here. It has also created what is the average price of Airbnb leasing for neighborhood groups in New York? Indeed. This is good insight. How is the price distributed by room type? Is Williamsburg. Very weak correlation. Positive correlation between minimum nice and price. This suggests that more expensive listings do not necessarily require longer stays. Let me know if you need any further analysis or if you want to investigate other aspects of the data set. Okay, so we got a really good question right now from Harry J. Foxwell. Kind of answer. Why questions? Why do cheaper properties have more reviews, for example? Right. So I think this is an awesome question because what's interesting about tool like ChatGPT is that it's also been trained on a lot of data. For example, like economics data, articles written on the Wall Street Journal about property prices in New York. Right. So we can even see if it can supplement the knowledge there with some other things. So I'm going to ask what is the average price of Airbnb listings? Okay. Can you provide three reasons why prices of Airbnb listings are more expensive in Manhattan and in Brooklyn? Share and here I want to make sure that it is truthful. Truthful. Provide sources that I can search for. To confirm your hypotheses. So. Demand and popularity. Manhattan is often seen as the heart of New York City and is a major tourist attraction. It houses many iconic landmarks such as Times Square, etc. You can refer to websites like New York city tourist and TripAdvisor for more information. Real estate prices are generally higher than in Brooklyn. The cost of owning or renting can directly influence the price. Okay. And availability of public transportation, which is something I would not have thought of per se, has a higher density or public transportation options including subway, buses, etc. Etc. However, a lot of this needs to be corroborated, right? By whoever is working with ChatGPT here. So this is why it's super important to keep the human in the loop in this situation and not treat ChatGPT like an agent. But we're going to talk about the end of the at the end of the live training. More importantly, I think a lot of you will have a question here like what's the point of learning programming? Right? I do think it's really important to know the general concepts and relative syntax of programming to be able to vet whether an answer is correct or not, right? I'll give you an example here. The when we were Windsorizing, if one argument was 0.1 instead of 0.01, we would have cut it off at the 90th percentile rather than 99th percentile. And this is where knowledge of the concepts of programming is really important. Now that we've covered kind of answering these four questions, let's create a report that we share with a executive around these questions themselves. So here I'm going to take this particular prompt that I have here. I would like you to now create a report aimed at an executive that contains the following A description of the data set Structure the report into headers and subheaders Combine images and text to make for an easy reading experience. Tailor the language you use for an executive so I've tried this before and it seems like ChatGPT code interpreter struggles with embedding images in markdown. So what I'm just going to say Provide placeholders or where to use images to make for an easy reading experience. Provides an executive overview Their support provides a high level overview of the New York City Airbnb listings data set. The data encompasses information about Airbnb listings in New York city collected in 2019, offering valuable insights to property types, pricing, location and more. Data set description collection of Airbnb listings across New York City. It contains the following key information okay, so here's a sample of the data set. I think that's fine, that's fine. Key Findings Manhattan, being the heart of New York City with numerous tourist attractions, has the highest average Airbnb listing price. It's followed by Brooklyn, Staten, Queens island and the Bronx. Our analysis revealed significant differences in price depending on the room type. As might be expected, entire home apartment listings tend to be priced higher compared to private room and shared loan listings. Most popular neighborhood for listings. This is also cool. Correlation between minimum nights and price. Provide recommendations. Okay, I think this is useful for a first draft, right? How I would probably change it, tailor it more to the audience depending on who I know of them. Provide for each key finding recommendations make sure that data the visuals created are higher quality and they're labeled and they are more tailored to the questions being asked. But I think this is a great start and it's a game changer when it comes to the augmentation of the data science workflow. And I think this is about to get standardized in a lot more coding environments in the future. Now with that I would also like to take some Q and A now before we wrap up. I see there's a lot of questions, so make sure to ask a lot of questions and I'll try to get to them as much as possible. Question here from Alex Rar do you think OpenAI is going to Extend code interpreter to other languages. If they don't, someone else will. We already have for example in Data Camp Workspace an AI assistant similar to code interpreter that does SQL and R and python. Another question here from LinkedIn user. Is there a limit to the data set quantity that can be uploaded? I think it's 100 megabytes if I'm not mistaken. Great comment here from Daniel from Facebook. Windsorization was an option presented to me as I follow along. It's really interesting, right? Large language models are pretty unpredictable and they can do a good they can have like varied, varied responses. This is an awesome question from Amarpal. Without us having to ask the right questions, can ChatGPT suggest good questions? We've seen an example here of ChatGPT suggesting a not bad example, but we do need that subject matter expertise you need to understand the business. For example, if you are Airbnb here to be able to ask it the right questions. Otherwise you're going to lose intentionality and we're going to discuss that a bit in more detail at the end. This code interpreter have a maximum set of questions it can handle. I see you had to re ask the first two questions. I was only trying to do that just to make sure that it was it remembered it. But I think you can only you can ask 50 messages every three hours if I'm not mistake. How does GPT4 know Airbnb uses a certain color matrix? My hunch is is that it has scraped the Airbnb data set, the website it read the HTML and understood what the color scheme of the Airbnb website looks like. Awesome set of questions we're getting right now as well. So here a question from Zen ferriss. How would ChatGPT know the unit of a price that I assume it was price per night, right? Or does it have a behind the scenes calculations validate? I think that given how popular this data set is, it probably has an internal memory of it. If we use it to interpret SQL, will it be better than regular ChatGPT? I don't think code interpreter runs SQL, but you can easily use like a SQL Alchemy type kind of package to let it run SQL. Great question here from Jennifer Dumont. Can ChatGPT recommend data cleaning based on human logic? For example minimum number of nights? There were some extreme outliers in the range of 1000. Clearly not correct. Can ChatGPT identify and provide insights for how to handle? I would say that it probably can do a not bad job, but human judgment is especially once looked at once with Augmented with a tool like ChatGPT can go a longer way in surfacing these types of insights than than just chatgpt on its own. Can I download the cleaned up data set? Yes, you can. So, So I'm just going to hear can you share the cleaned data set a CSV file using a link. Take the format a TSV file. Let's make it a bit more annoying. So here it's saving it to a TSV. The separator is a tab. I have saved the clean data set. You can download it using the following link and it called it cleaned as well. Okay, this is a great question from Huma. How can visual data analysts who use software inclined towards basic coding and drag and drop features and have a coding skill gap incorporate these techniques within the software they use? I think, you know, the thing is, is like someone like you who's a visual data analyst probably has really good intuition about how code works and how systems work and how data systems work, but don't necessarily have the knowledge of the syntax. Right? And I think tools like ChatGPT, code interpreter, data camp, workspace, AI assistant will help you bridge that gap and be able to, you know, get over the coding syntax hump and into the value. Getting a lot more questions here. So question that is we're getting quite a few times how what is the security on the data sets provided to code interpreter? How safe it is in relation to data protection? This is quite an open ended question. My initial answer is I don't know. This is why I use a dummy data set here. However, ChatGPT does provide you the ability to disable chat history and training. So whatever chat you provide, whatever data you provided, it's not used in the training data. However, that does not mean that errors cannot happen. You're not able to have ChatGPT being a point of leakage of that data. And more importantly, that does not mean as well that it is wise to upload a very private data set, for example into a consumer grade application. You wouldn't upload highly sensitive data to Facebook for example. And I think we should treat it with the same level of discretion. So we're getting quite a few questions. But what I want to do is also end on a few notes and then we can grab some more time for Q and A. So here other uses of code interpreter that goes beyond data science. I've been doing a bit of digging in the software engineering industry and this is by no means an exhaustive list. Right. ChatGPT code interpreter is a week and a Half old. So a lot of the use cases are emerging still today. And other use cases of code interpreter. We just saw this in action. Converting a CSV file into CSV file, for example, you know, converting a PDF file into an image and vice versa. So converting file formats, even editing and updating images, making them gifs, et cetera, like you've seen a lot of novelty use cases will do that as well. And I think it can unlock a lot of work. If you extrapolate this on other types of more software engineering tasks, it can really help data scientists become better coders and achieve certain tasks that coders usually do. It can help develop software. There's simple tools, dashboards, develop simple games. I've seen a lot of people use, for example Mid Journey images, making them assets, creating like a space invader game using ChatGPT code interpreter. And I want to maybe show you like one example of a of combining and editing images and making them into GIFs. Right? So I'll open here a new chat code interpreter. I'm sure many of you have known that this week is the release of both Oppenheimer and Barbie and this is a phenomenon called Barbenheimer. So I have the picture of the poster of the Barbie film and of the Oppenheimer film and I zipped them into one file called Barbenheimer. And I'm going to open it here and what I'm going to do, let's see if I written down the prompt or not. So I'm just going to let it be creative here. So I have provided you a zip file containing image, poster, image Barbie and Oppenheimer. Please create a funny if combining both of these images, celebrate the release of these films, use this as an opportunity, show how performant ChatGPT code interpreter is. So let's see how it does. So it's extracting the files. Now let's display the images. Let's see how it looks like. Okay, it's going to rescale the images to have the same dimensions. Create a GIF that alternates between these two images. Okay, it's rescaled. Openheimer looks a bit ugly, but that's okay. Now it's using the pill library. It gave me a gif. Download the gif barbenheimer and I'm just gonna. Boom. Right? So of course this is not necessarily useful, but it's really illustrative of how we can use now AI to perform creative operations and tasks that are not necessarily within our realm of expertise. I didn't know how to use the pill library Before I even had to Google how to like unzip a file in Python. So I think this is super useful in augmenting kind of the data science workflow and enabling data scientists to think outside of the box and creating new solutions. I'll give you an example. Let's say you're creating a dashboard, but you don't necessarily know Django. Can you use Django? Can you use code interpreter to create, to create that Django dashboard for you? So really useful way to think about code interpreter as an augmenter of the data scientists and data onscapability. Now that we have wrapped up our kind of showcase of ChatGPT code interpreter, let's maybe discuss the future of AI assisted coding, augmentation versus automation and a lot more. So I've definitely seen a lot of examples of ChatGPT code interpreter over the past week as kind of being treated as an autonomous agent that can, you know, take a data set, do analysis for me and let me know how it's done and then it's done. It's all cool. Okay, good job. I think that's a maybe at least now I'm not sure how. Never say never. I'm not sure how will these tools will evolve over the next year or two or so. But as of now, agents are not as performant. We saw for example in the Windsorization example, I told ChatGPT winds rise, right? I think once we work with AI assistants in a synchronous fashion and we look at augmentation, it's probably much good. It's going to be a lot more useful in the long run when it comes to providing a lot of value and increasing our productivity. A good example comes from chess here. I think in 2018 or something along those lines, there was a competition in chess where it was an AI assistant, an AI versus a human versus a human and AI working together. And almost most of the time a human and an AI working together beat the other players. So this is a good mental model to have around humans and augmentation and the risk of treating AI as an agent here, especially coding agents when it comes to data analysis. And we mentioned this slightly, is the loss of intentionality, you know, for example here, great thinker on the topic, Ethan Mollick, I think he's a professor in data science, talked about, you know, how he just uploaded census data in a Data Dictionary into ChatGPT with code interpreter and said, hey, I would like you to generate some hypotheses about industries and then test them with data, make assumptions if you need to, and then put it in a paper. Right? Write a paper for me. Right? And you know what this will happen is that will lead to the generation of a lot more academic literature. And that academic literature can be true, but it's going to be very formulaic and very obvious. And here you're going to have a lot of research that pops up with a lot of intention behind it. And this is the danger of like, hey, chatgpt, create an analysis for me, wrap it up, job done. Right? What's the intention though? And that's where data science provides value, is that the human needs to decide the intention behind the analysis. Similar peer review is not gonna, is gonna get weird, right? If the peer review process is done with AI and the updates are done with AI, then what's the intentionality behind the peer review? Right? Second thing of ChatGPT risks here is uploading sensitive data, right? I also showed you how to delete, turn off chat history and training. But, and the good thing is that code interpreter is a sandbox environment. It, you know, it's an environment that gets destroyed after you close. It doesn't get, it's not connected to the Internet per se, where it can act, perform ape actions to the Internet. But however, it's really important to exercise caution, right? It could be a point of data leakage if you wouldn't upload it to Facebook, don't upload it to chat to ChatGPT. So at least that's what Fat Pitney, our general counsel, told us as we're thinking about using ChatGPT for internal data. And you know, when it comes to augmentation, I'd be remiss not to talk about as well, the workspace AI assistant. Anyone here can go access datacamp Workspace. Right now we have, I think, a really good model and way of thinking when it comes to like using AI for coding related tasks, which is it helps you generate the code, it helps you update the code, it helps you correct the code. However, you're still on a much stronger driver seat than just treating it as an agent. So highly recommend that you check out Data Camp Workspace AI Assistant. We're sending links in the chat. However, do check it out and it's really important to think about the role of your skill set here as a, as a potential data scientist. Data scientist, data analyst. I think this, this segue is really great to this question by Lydia Mora, paranoid about how should I continue my programming classes now that ChatGPT solves everything. 1 ChatGPT does not solve everything. 2. Programming is not just knowing syntax, it's knowing the way programs are built. It's understanding how systems work together. It is more than just being able to write print, quote hello world. It's the ability to create systems and architect them and make sure that they are providing impact and creating real world value for your stakeholders. And while the coding workflow will be augmented, the need for for coders will go up, not down. If it's easier to code, then everyone will become a better coder, from the people who know how to code really well to the people who don't know how to code at all. So it's important to develop the understanding of how systems are built. Best practices for building these systems but maybe being married to the syntax is no longer a skill the same way it used to be in the past. A good example is arithmetic. Back in the day people put a lot of premium on being able to calculate numbers in your head pretty well, but with the calculator released, we've been able to abstract that task away to a machine. Similarly, knowing how to program and use computer coding syntax may need to get abstracted away. But knowing the importance of using coding syntax when to use it, how to design a system is still really important. And maybe as we wrap up principles for success in a time of innovation, embrace change. Use it to your advantage. Be intentional about the use of AI for coding tasks. Tools like ChatGPT Datacamp Workspace can help augment the data roles of today and will most likely transform them, but it will never, in my opinion, displace them. You will need to have an augmentation of workflows using AI. Highly recommend that you check out this podcast episode with Bob Muglia, former CEO of Snowflake that we had a discussion with on why augmentation and not automation is the path of the future. I'll be also super happy to have a chat with you on LinkedIn if you if you if you'd like to, you know, have a chat on code interpreter AI. How things are going now. We'll send over these additional ChatGPT and generative AI resources for you. Highly recommend that you check out Data Frame, but I'll be super happy to answer some questions while we have a couple of minutes left. Here. Question from Katina I think ChatGPT will help me better ask better questions of my beta. If anything, I love it. I think that's a good way to thinking about it. Is this going to be available after it's done? Yes. We will make sure to share the recording and you can just as soon as we stop recording you can go watch it again on YouTube, LinkedIn Live etc. How is Data Camp? How does data security with workspace AI assistant? 1 you can turn it off 2 it's ISO compliant we have I think it's called ISO 2 something 60 compliant which is like the strictest of data privacy laws. Another set of questions here. Let's looking at the pinned questions so are there any other generative AI tools for data science besides ChatGPT? Highly recommend that you check out data camp AI work like the workspace AI assistant. Really good at, you know, augmenting the data science workflow in my opinion. Also other ones are the GitHub copilot for example I think more aimed at software engineering, but Workspace AI system is really useful for data science tasks. Any recommendations on capturing transforming code interpreter output for a presentation in a jupyter notebook with minimal rework? From the examples I've seen online before, it used to be used to be able to export things into PDF or into an IPY and be like a jupyter notebook format. But it seems like OpenAI has turned that ability off I think due to security. Can chat enrich this data by adding weather data? Indeed, that's a really good use case. It's a very good question when building my project portfolio either on Kaggle or GitHub, if I borrow some code from ChatGPT, will this be regarded as plagiarism? I personally don't think so. I think everyone will have to use some form of AI assisted tool and I think that the faster we adapt and become better at using it, the more we will be able to develop rituals around it. No. One final question. Maybe actually a comment like radio it was destined to disappear, but it's still alive and now we have podcasts too. I think this is a great way of thinking about it. I think the segues as well do check out the Data Frame podcast. Another. So final question here. Maybe can ChatGPT code interpreter support say in modeling of exotic exotic derivatives, convertible bond structure credit? If so, will there be advanced classes available in Data Camp in the future? So we do have a few finance oriented courses specifically on the bond market on tradable assets and I do think that ChatGPT code interpreter will probably be useful here. But there's only way one way to find out. It's one trying it out but secondly also being a very strong editor of its work here. You don't want to receive financial advice from an AI. And I think this is about it for today. We are running out of time. I do want to say a hu huge, huge thank you for everyone who attended today's live stream. I think we've had more than 900 people attend this one, so it's really awesome to see that. I want to say a huge thank you for everyone who took the time today. You know, people joining us from all over the world. I saw people from Syria, from Yemen, from North Africa, from the us, From Europe, from from Asia. So if the time zone was weird for you or like uncomfortable, I really appreciate that and I really appreciate everyone who joined in today. It's really an honor doing these things. And if there's any other type of live trainings that you want to see, like any type of ChatGPT live training or any type of topic, do mention it in the comments. Repost the LinkedIn thread that you see here. It will really help us spread the word about these types of webinars, especially if you enjoyed it. And do let me know via direct message. Hey, I'd love to see this live training in the mess in the future. It really helps us create a great experience for you guys. So I really, really appreciate it and thanks all. Have a great weekend. Make sure to watch the Barbie and Oppenheimer.
More from Richie

#359 My Best Friend is AI with Valerie Tiberius, Professor of Philosophy at University of Minnesota

How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

#358 How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon







