Set Up and Inspect the Data
00:00 You’ve learned a lot about substring identification using Python so far, and in this last part of the course, we’re going to address yet another pretty common use case where you might want to find a substring inside of a pandas DataFrame column. So if you want to follow along with the examples I’m going to show here in the course, then make sure that you download the source materials, which includes a CSV file that has a bit of information that we’re working with.
You can find the material in the dropdown called Supporting Material underneath the video. And then you download the Sample Code ZIP file. You are also going to need to create and activate a virtual environment and install pandas. Once you’re set up with these, then you can start a Python interpreter and import pandas as
pd, and you’ll work with a method on a pandas
Series object that allows you to perform this substring check.
And I also have access to the
companies.csv file. I have it in the same directory as I started this interpreter from, so I’m going to load it here by saying
pd.read_csv(), and then I give it the name, which is just
Become a Member to join the conversation.