Merging on different sets of fields
As you saw in the previous exercise, both customer_data and app_purchases have a common 'uid' column that you can use to combine them. If you explored them further, you would discover that they also have a common date column that is named 'date' in app_purchases and 'reg_date' in customer_data.
In this exercise you will explore merging on both of these columns and looking at how this impacts your final results.
The two datasets from the previous exercise - customer_data and app_purchases- have been loaded for you, with 'reg_date' in customer_data renamed to 'date'.
This exercise is part of the course
Customer Analytics and A/B Testing in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Merge on the 'uid' field
uid_combined_data = app_purchases.merge(____, on=['____'], how='inner')
# Examine the results
print(uid_combined_data.head())
print(len(uid_combined_data))