This lesson introduced some methods for combining multiple DataFrames:
- Creating a DataFrame made by matching the common columns of two DataFrames is called a
- We can specify which columns should be matches by using the keyword arguments
- We can combine DataFrames whose rows don’t all match using
outermerges and the
- We can stack or concatenate DataFrames with the same columns using
Cool T-Shirts Inc. just created a website for ordering their products. They want you to analyze two datasets for them:
visitscontains information on all visits to their landing page
checkoutscontains all users who began to checkout on their website
We want to know the amount of time from a user’s initial visit to the website to when they start to check out.
merge to combine
checkouts and save it to the variable
In order to calculate the time between visiting and checking out, define a column of
time that calculates the difference between
visit_time for every row.
.mean() to calculate the average time to checkout and print that value to the terminal.