<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Apoorva Pachori on Medium]]></title>
        <description><![CDATA[Stories by Apoorva Pachori on Medium]]></description>
        <link>https://medium.com/@apoorva_writes?source=rss-d95166eb3446------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*t67uAv_7loPLH8XkDPBcVg.png</url>
            <title>Stories by Apoorva Pachori on Medium</title>
            <link>https://medium.com/@apoorva_writes?source=rss-d95166eb3446------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 09:10:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@apoorva_writes/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Can You Use ChatGPT to Read CSV Files?]]></title>
            <link>https://expertdatatips.com/can-you-use-chatgpt-to-read-csv-files-593ccfbf1cca?source=rss-d95166eb3446------2</link>
            <guid isPermaLink="false">https://medium.com/p/593ccfbf1cca</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[data-analysis-tool]]></category>
            <category><![CDATA[csv-file]]></category>
            <category><![CDATA[gigasheet]]></category>
            <dc:creator><![CDATA[Apoorva Pachori]]></dc:creator>
            <pubDate>Thu, 23 Feb 2023 14:14:10 GMT</pubDate>
            <atom:updated>2023-02-23T14:25:53.870Z</atom:updated>
            <content:encoded><![CDATA[<p>Is it possible to use ChatGPT for data analysis?</p><p>In 2023, ChatGPT is <em>everywhere.</em> You see it in the news, on your Twitter feed, in your Quora communities, and in your most visited subreddits. What’s fascinating is that a lot of the content on the internet is now generated by ChatGPT — from news reports to code to dad jokes. And any time you ask ChatGPT to write something for you, it replies with an enthusiastic “Sure!”</p><p><em>It is almost an AI genie with unlimited wishes.</em></p><p>But, what if you could just tell ChatGPT, “Hey Chat, please analyze this data for me and tell me how many of my customers are in their 40s. Also, please remove any duplicate records while you’re at it.”</p><p>Wouldn’t it be convenient, especially if you have a large CSV file full of customer data?</p><p>Let us give it a try and test ChatGPT’s capabilities as a data analysis assistant.</p><figure><img alt="Use Chat GPT to create dataset" src="https://cdn-images-1.medium.com/max/1024/1*0Ekh86KWNX5P6m0Ep1c3Xw.png" /></figure><h3>What Kind of Data Can ChatGPT Read?</h3><p>Here is the answer straight from the horse’s mouth:</p><figure><img alt="ChatGPT’s answer to what kind of data it can read" src="https://cdn-images-1.medium.com/max/740/0*MVEExzFk-6oGmrGB" /><figcaption>ChatGPT can read structured data in the form of tables and databases.</figcaption></figure><p>ChatGPT’s USP is that it can process text written in natural languages in various formats, such as news articles, social media posts, emails, chats, and more. But, for this article, we will focus on structured data.</p><p>ChatGPT also claims that it can process structured data in the form of tables, spreadsheets, and databases. It can also read human-readable formats like HTML, XML, JSON, and YAML.</p><p>So, let us make it read a CSV file and see how it fares.</p><h3>About The Test Dataset</h3><p>For this experiment, we will be using a dataset about Black Friday Sales from<a href="https://www.kaggle.com/datasets/sdolezel/black-friday?select=test.csv"> Kaggle</a>. This massive CSV file contains 550K records about Black Friday purchases in a retail store, organized into 12 columns:</p><p><strong>User_ID:</strong> A unique value identifying each buyer<br><strong>Product_ID:</strong> A unique value identifying each product<br><strong>Gender:</strong> The gender of the buyer (M or F)<br><strong>Age: </strong>The buyer’s age<br><strong>Occupation: </strong>The buyer’s occupation, specified as a numeric value<br><strong>City_Category:</strong> The city category in which the purchase was made<br><strong>Stay_In_Current_City_Years: </strong>The number of years that a buyer has lived in their city<br><strong>Marital_Status: </strong>The marital status of the buyer. 0 denotes single, and 1 denotes married.<br><strong>Product_Category_1: </strong>The main category of the product, specified as a number.<br><strong>Product_Category_2: </strong>The first subcategory of the product<br><strong>Product_Category_3: </strong>The second subcategory of the product<br><strong>Purchase: </strong>The amount spent by a user for one purchase in dollars</p><h3>Trying To Read CSV Files With ChatGPT</h3><h3>1. Very Small Datasets</h3><p>Let us test the waters with a small dataset of 5 rows.</p><figure><img alt="Giving ChatGPT 5 records in the CSV format" src="https://cdn-images-1.medium.com/max/740/0*q5WQ-xCi7HkpceCQ" /></figure><p>Success!</p><p>True to its words, ChatGPT identified that this data is in the CSV format. It also correctly identifies what each column means.</p><h3>2. Let’s Add More Records &amp; Filter Data</h3><p>Let us now feed ChatGPT 50 records from this database and ask it to filter them.</p><p>I have pasted the first 50 entries from the CSV file and asked ChatGPT to display them in the chat window.</p><figure><img alt="Giving ChatGPT 50 records and asking it to filter them" src="https://cdn-images-1.medium.com/max/740/0*gke5yZKHOXETzdhE" /></figure><p>And sure enough, I got this response. Turns out, ChatGPT is able to filter out data from a CSV file of 50 records. Impressive!</p><figure><img alt="ChatGPT displays the results of filtering by gender" src="https://cdn-images-1.medium.com/max/740/0*CU1Yb6og9cvgOPum" /></figure><p>Can it filter based on multiple criteria? Or will it get confused by multiple filters? Only one way to find out!</p><p>I asked our AI friend to filter the 50 rows by two criteria written in plain text: <em>Please display all the records where the Gender is M</em>,<em> and the Age is 25–36.</em></p><p>Sure enough, ChatGPT filtered out the correct records. But, it did not include the header row. So, if you want to copy and paste this data into a new CSV file, you must manually add the header row. (Not ideal!)</p><figure><img alt="ChatGPT filters our dataset by two criteria" src="https://cdn-images-1.medium.com/max/740/0*5jfoLYrkkFM9Zl6H" /></figure><h3>3. Can ChatGPT Process 100 Records?</h3><p>To up the ante, we will now give ChatGPT double the rows to process. I copied and pasted the first 100 entries and asked it to display the records where the value of age was 55+.</p><figure><img alt="Asking ChatGPT to filter 100 CSV records by age" src="https://cdn-images-1.medium.com/max/740/0*TMA9bmOjVAnWWo1L" /></figure><p>Unlike our previous experiment, this time, ChatGPT rendered a Python code. I was expecting an inline display of records, but this isn’t exactly wrong. <strong>However, this output tells us that ChatGPT isn’t consistent.</strong></p><figure><img alt="ChatGPT renders a Python code for filtering a CSV file" src="https://cdn-images-1.medium.com/max/740/0*8PrkxKCKVWpmhYIW" /></figure><h3>4. Adding Even More Data…</h3><p>The average customer dataset has a <em>lot </em>more than a mere 100 records! In fact, the dataset we are using for this experiment has more than 550K records. So, let us test the waters with 2000 records.</p><p>I pasted the first 2000 entries from the CSV file and asked ChatGPT to simply count the number of rows. But, it failed.</p><figure><img alt="Giving ChatGPT 2000 rows" src="https://cdn-images-1.medium.com/max/740/0*5FV7f9jRabqc4zxL" /></figure><p>ChatGPT seems to have a hard time processing a large number of records.</p><p>Sure enough, when I tried adding more than 2000 records, I got the following error message: <em>There was an error generating the response</em></p><figure><img alt="Error message from ChatGPT: There was an error generating a response" src="https://cdn-images-1.medium.com/max/740/0*_WFJDu6USDv3zBf1" /></figure><p>Despite its limitations, ChatGPT can still assist you with data analysis. Let us look at some ways how.</p><p><strong>Here is How You Can Use ChatGPT For Data Analysis</strong></p><h3>#1 Generate Python Code</h3><p>While ChatGPT cannot process large CSV files, you can still use it to make sense of large datasets. One way to use it is by asking it to generate Python code.</p><p>So, if you do not know how to code, ChatGPT can write some basic data analysis code snippets for you. Just make sure you specify all the data it may need because <strong>ChatGPT’s responses heavily depend on your inputs.</strong></p><p>Here is an example:</p><figure><img alt="Specifying a dataset’s structure" src="https://cdn-images-1.medium.com/max/740/0*2HBBiXLCS5BozEtM" /></figure><p>This is ChatGPT’s response, complete with a Python code snippet you can copy, edit, and run. It also tells you:</p><p>1) How the code works</p><p>2)Where to make the necessary changes</p><p>3) What is the expected output of the code</p><figure><img alt="Python code generated by ChatGPT" src="https://cdn-images-1.medium.com/max/706/0*-3xbapudXJjWM47H" /></figure><h3>#2 Quickly Populate Tables With Sample Data</h3><p>Another way to use ChatGPT for data analysis is by generating sample data.</p><p>With sample data, you can quickly test your transformations and move faster through your development and testing process. So, if you have an empty dataset, you can populate it with random data and start testing. Once again, remember to specify everything clearly. Mention all the fields in the dataset and state how many records you want.</p><p>Here is an example.</p><figure><img alt="Specifying a table’s fields and their descriptions" src="https://cdn-images-1.medium.com/max/740/0*F_eJkjuIPM16lVUY" /></figure><p>And here is the neat sample dataset ChatGPT gave me:</p><figure><img alt="A table containing sample data generated by ChatGPT" src="https://cdn-images-1.medium.com/max/728/0*mKTAFBO-NgeHTU5V" /></figure><h3>A Better Way to Read Large CSV Files</h3><p>It would be amazing if ChatGPT could just process your dataset of 550K records and answer all your queries. Alas, it doesn’t have that capability yet.</p><p><strong><em>But, Gigasheet does!</em></strong></p><p>Gigasheet is a FREE, no-code, cloud-based solution for all your data analysis needs. It allows you to open large files, no matter where they are stored and how. With<a href="https://www.gigasheet.com/free/online-csv-viewer"> Gigasheet’s CSV viewer</a>, you can work with CSV files with unlimited rows.</p><p>You can start exploring<a href="https://app.gigasheet.com/spreadsheet/Black-Friday-Data-csv/d212635f_1041_4bb8_94db_fac9e8e9b075?public=true"> this data in Gigasheet. No login required</a>.</p><p>Here is how the dataset we used in this example looks like when uploaded to Gigasheet:</p><figure><img alt="Viewing the test data in Gigasheet" src="https://cdn-images-1.medium.com/max/740/0*u38rfo1wOqnYCjtt" /></figure><p>No crashing, no mistakes, and no cumbersome lines of text.</p><p><a href="https://app.gigasheet.com/signup"><strong><em>Create your FREE account and get started today!</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=593ccfbf1cca" width="1" height="1" alt=""><hr><p><a href="https://expertdatatips.com/can-you-use-chatgpt-to-read-csv-files-593ccfbf1cca">Can You Use ChatGPT to Read CSV Files?</a> was originally published in <a href="https://expertdatatips.com/">Expert Data Tips</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>