Improve Working With Data Using ChatGPT

Generate Data in any format with ChatGPT

Techletters
4 min readJan 6

--

Improve Working With Data Using ChatGPT. Image created by the author using Canva Pro.
Improve Working With Data Using ChatGPT. Image created by the author using Canva Pro.

ChatGPT is a hot topic recently and the hype is justified. It is like Google on steroids. If you are working in the space of Data Analytics or Data Science you often need data.

Why don’t you use ChatGPT to generate the data in the format you need? I will showcase some examples that help you understand the patterns.

Example 1: Get Airport Data as CSV

Imagine you need data about the different international airports in the world with their IATA code. Just ask ChatGPT to get it for you.

##My Input
Get me a list of all international airports, their city and IATA code

##ChatGPT response
1. John F. Kennedy International Airport (JFK) - New York City, NY
2. Heathrow Airport (LHR) - London, England
3. Los Angeles International Airport (LAX) - Los Angeles, CA
4. Charles de Gaulle Airport (CDG) - Paris, France
5. O'Hare International Airport (ORD) - Chicago, IL
6. Frankfurt Airport (FRA) - Frankfurt, Germany
7. Hong Kong International Airport (HKG) - Hong Kong
8. Tokyo International Airport (HND) - Tokyo, Japan
9. Amsterdam Airport Schiphol (AMS) - Amsterdam, Netherlands
10. Dubai International Airport (DXB) - Dubai, UAE
...

We want to have the data in a CSV format, so let's ask ChatGPT to provide it.

##My Input
Provide it in CSV format

##ChatGPT response
JFK, New York City, NY
LHR, London, England
LAX, Los Angeles, CA
CDG, Paris, France
ORD, Chicago, IL
FRA, Frankfurt, Germany
HKG, Hong Kong
HND, Tokyo, Japan
AMS, Amsterdam, Netherlands
DXB, Dubai, UAE
...

We additionally want to have a header line.

##My Input
Add a header to the CSV file

##ChatGPT response
Airport, City, IATA Code
JFK, New York City, NY
LHR, London, England
LAX, Los Angeles, CA
CDG, Paris, France
ORD, Chicago, IL
FRA, Frankfurt, Germany
HKG, Hong Kong
HND, Tokyo, Japan
AMS, Amsterdam, Netherlands
DXB, Dubai, UAE

You understand how it works, right? Let’s take another example.

Example 2: Get City & Zip Code Data as JSON

We need all cities from California and their zip code. No problem for ChatGPT.

--

--

Techletters

#ai #datascience #salesforce #crypto #kafka #python — Follow me: https://techletters.medium.com/membership