Indexing a dataframe in pandas is an extremely important skill to have and master. Indexing just means selecting specific rows and/or columns in a dataframe or series. In this tutorial, we will cover the loc and iloc methods, which are two of the most common ways of indexing a dataframe in pandas. I will be working with the ufo sightings dataset found here in jupyter notebook.
Before we start, let’s read in our data into a dataframe and take a look at the top 5 rows of our ufo dataframe:
#python #data-science #machine-learning #programming