From the course: 15 ChatGPT Tips for Everyday Data Analysis

How to fix inconsistent text data with ChatGPT - ChatGPT Tutorial

From the course: 15 ChatGPT Tips for Everyday Data Analysis

How to fix inconsistent text data with ChatGPT

There's nothing worse than opening an Excel file for analysis, only to realize that the data is a complete mess. In this video, I'll show you how to use Chats GPT to instantly clean and standardize messy text, so you can focus on the part that actually matters, analyzing the data. For example, here we have a sales dataset with customer names, states, and sale amounts, but the state column is a mess. California appears as CA, C.A, and California, and the same kind of inconsistencies show up across all of the other states as well. This may not seem like a big deal, but the moment we try to summarize this data, the same state shows up multiple times, and our analysis is instantly wrong. Instead of manually fixing each state row by row, let's ask ChatGPT for help. Just copy the data table, open ChatGPT, and enter the prompt Can you clean all of the states in this data so that each row contains a full U.S. state name? Then paste the Excel data table into the chat and press enter. ChatGPT immediately scans the entire table, recognizes the values that represent the same state, and then automatically standardized every row to the full U.S. state name. This data table looks so much better, so I'm going to tell ChatsGPT to return this as a download-ready Excel file, and ChatsGPT instantly generated an Excel file containing the clean data. Now all we have to do is download the new file, and we are ready for analysis, a task that could have taken hours of tedious Excel work done in seconds.

Contents