An excellent way of gaining insights about a company's customers and their behavior is to perform a segmented analysis. These segments are groups of customers that share the same characteristics and are usually called cohorts. Their definition depends very much on the type of business we are dealing with.
The dataset we will analyze contains a list of customer IDs, the date when they first purchased something from us, the day they left us, and the mean amount of money spent per month. What does "left us" mean in this context? It is mainly a matter of definition. For example, if we refer to a credit card, we could consider that the customer left when they cancelled the card, or maybe we want to go further and say that if the customer did not spend any money for two or three months, we consider that they have left...