Upload CSV File to ChatGPT and Do Data Analysis without Code Interpreter Plugin

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
currently the only way to upload files to charge gbt is by using the code interpreter plugin however this plugin isn't available to everyone yet so in this video I'll show you a free workaround I found to upload files to chat DBT and work with them as if you were using the code interpreter plugin by the end of this video we're going to have something like this something like this green button that we can click on it and upload any file that we want and this is going to be pretty easy and straightforward so let's get started alright first we have to go to chat DBT and then it doesn't matter if you're using ubt 3.5 or gpd4 this is gonna work with both models so now we have to copy and paste this prompt that I'm gonna leave on the description of this video and this is the prompt so this is a prompt that I found in another YouTube video and basically what this prompt does is tell child gbt to create a submit file button and also tells what are the files that are going to be supported for example txt GS CSS Json and CSV files and well these are the files that are going to be supported and charging it is going to create a JavaScript code that we're gonna paste in the console to get this green button and something important you need to know is that rgbt has a limit of 15 000 characters so every time we reach that limit we have to split the file into different chunks for example if we have a txt file or a CSV file with 30 000 characters we're gonna have two chunks of 15 000 characters each and we're gonna do this automatically thanks to this prompt okay once you copy and paste this prompt we only have to press enter and then we have to copy the JavaScript code that is going to be generated okay now that we have the code we only have to copy this code and then we have to right click on any part of the site and then select inspect so now we have these developer tools and we have to click on these two arrows that you can see here so we click here and then we select console and once we run the console we have to clean everything that we see here that is in Red so we click on this erase button that is here clear console and then we have all this empty so now we can paste that curve that we just copied so I'm gonna paste this one and then once this JavaScript code is pasted I'm going to press enter and as you can see now we have this submit file button here on the bottom of this page so now we can submit any file we want as long as it has one of the formats that are supported that you can see here so txt CSV Json and more in this case I'm gonna use the CSV file to do some data analysis so I'm going to click on submit file and then I'm going to select this population underscore total.csv but before I upload this file I'm going to start a conversation with chat DPT from scratch to avoid any issue okay now I have a new chat with Chad DPT and by the way when you start a new chat you have to follow the same steps to get this submit file button so now I'm going to click on it and then I'm going to select population underscore total and as you can see here this prompt split that file into different chunks for example here we have the first part of this file and then if we scroll down we're going to see that the second part and if we keep scrolling we're gonna see that third part and I think the total is seven parts so we should wait a couple of seconds or minutes depending of which model you're using DBT 3.5 or ubd4 give the 4 is going to take more time because it's a bit slower but with DVD 3.5 it should be faster okay now chat DBT finished uploading all the seven parts of this CSV file and now I can start doing my data analysis I'm going to start by using this prompt so I'm going to read the seven parts of this CSV file into a data frame using Python and make a line plot of this population data specifically for China and India so I'm going to tell charging to do this so I'm going to press enter and see what happens so now I'm going to the last line and as you can see cat GPT is generating the code that is going to get me this line plot so I just copy this code and here in Jupiter notebook I'm going to paste it but here I have to make a little change because as you might remember Chad DVD split the file into seven chunks but here I have this file just in one single file so what I have to do is just get rid of this part and instead of reading file name I'm going to read population underscore total.csv that's the only change that I'm going to make and after doing this everything should be fine so now I'm gonna run this and we should see the line plot and as you can see here is the line plot and this is the population growth of China and India over the past years but as you can see this purple was in properly generated here we have 1955 at the end and 2020 at the beginning and what I did was ask chargity again and I got a new code and I can paste it and replace the previous code that I have here instead of reading every chunk I have to read the file as a whole so here I use this code and now I can run this and get a proper line plot for the population growth of China and India and as you can see it looks perfect and that's how we do that analysis with cat gbt but there is a better way to do this without even having to use our code editor here I'm using jupyter notebook but you don't have to use your code editor but you can also use chat DBT to make these visualizations and see the visualizations on this website so what we have to do is instead of using a GPT 3.5 we have to use gpd4 and upload our CSV file or any file we have and then do the same things but in this case we have to use a plugin and this plugin is called Wolfram which I talk about in another YouTube video that I'm going to also leave on the description so this is the plugin called Wolfram and this is only available to chat gbd plus users that's one of the downsides but this is very cool because you can make the visualizations on the chat DBT website so I'm going to enable this plugin and then I'm going to follow the same steps to get our submit file button okay here I have this mid 5 button and now I'm going to upload another file to make a simple test so here I have a smaller file because as I told you before give it to 4 is going to take more time in uploading your file if you have a lot of data and that's why I chose to use this a small file to do this analysis and this test so now I have this uh simple analysis of the columns in this CSV file and I'm going to stop this generation and I'm going to skip to that data analysis and now that my CSV file was uploaded I can make chat DBT to generate a bar plot for example and I'm going to use this prompt so I'm going to tell chargpt to make a bar plot showing how many students each course has so this is a CSV file with data about some courses the number of students the ratings the number of ratings and more data about this so now chat DBT using Wolfram should be able to make this workload and show it on this website alright now we got the plot but as you can see we got the number of students on the x-axis and the IDS on the y-axis so I'm gonna tell child DPT to change the access all right I asked how GPD to change the X and the y axis and now it looks much better unfortunately it doesn't look as good at this bar Port that I generated before making this video but it's still a good a good bar plot that we can customize using more prompts and that's how you can upload files to charge EBT and use chat DVD for that analysis without having the code interpreter plugin and speaking of that analysis a good app I used to do some data analysis is quadratic which is the sponsor of this video quadratic is a tool that combines the familiarity of a spreadsheet and the power of code quadratic is a spreadsheet where you can write python code SQL queries and Excel formulas and you can even use third-party python libraries directly into your spreadsheet quadratic provides a great visual way to learn and work with data it allows you to write code and see the output in full detail like with jupyter notebooks however unlike other spreadsheets quadratic extends forever in every direction you can pinch and zoom navigate your data the way you want and drag and drop your data in any cell to try everything quadratic has to offer for free visit quadratic hq.com or click on the link in the description of this video alright that's it for this video I'm gonna leave that prompt using this video and also the code that gets the submit file button on the description of this video so you can easily upload files to chatb team alright that's it for this video I'll see you on the next one
Info
Channel: The PyCoach
Views: 11,389
Rating: undefined out of 5
Keywords:
Id: UPC4b-xOg6Q
Channel Id: undefined
Length: 9min 8sec (548 seconds)
Published: Fri May 26 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.