October 2019
Beginner to intermediate
674 pages
16h 43m
English
As mentioned earlier, the data presented is customer-level data. It would be more feasible and easy to perform analysis on aggregated data, which in this case is a region. To start with, we need to understand how the customers are spread across each region. Hence, we are going to use the groupby function to find the number of customers in each zip code. The snippet and its output are shown in the following code:
data.groupby('zip')['zip'].count().nlargest(10)
The following is the output:

This gives the first 10 zip codes that have the maximum number of customers.
Therefore, we can ...
Read now
Unlock full access