In this example, we'll be working with data from ShoeFly.com, a fictional online shoe store.
# Before we analyze anything, we need to import pandas
import pandas as pd
We can load data into Pandas from a csv (comma-separated variable) file. This data represents purchases from ShoeFly.com.
df = pd.read_csv('shoefly_orders.csv')
Let's examine the first 10 rows of our data!
df.head(10)
Let's select everyone who ordered black sandals.
df[(df.shoe_type == 'sandals') & (df.shoe_color == 'black')]
Let's see what Susan Dennis ordered.
df[(df.first_name == 'Susan') & (df.last_name == 'Dennis')]
It looks like Susan ordered white fabric ballet flats!