Performs Cohort Analysis on a given dataset using Jupyter notebook which includes libraries like pandas,matplotlib and seaborn to get details about a retail store and see which products is being sold repeatedly and which are not
•Understand what is cohort and cohort analysis.
•importing libraries.
•Handling missing values.
•Month extraction from date.
•Calculate number of unique customers in each group.
•Create cohort table for retention rate.
•Visualize the cohort table using heatmap.
Let's start-
A cohort is simply a group of people with shared characteristics.
Cohort analysis is a type of behavioral analytics in which you take a group of users,
and analyze their usage patterns based on their shared traits to better track and understand their actions.
•First of all imported multiple libraries which include:-
Pandas
matplotlib
•To read the file in jupyter notebook we have to first call it in jupyter
and then show the header and information of the file
3.Created a column index with the first time customer which include cohort months
•By counting the number of customerID using cohort month and cohort index
we can see the results for cohort month and cohort index.
one more thing here shows that how the customerID is unque in every detail
so that we can get only unique data and not duplicate/null data.
•Now as you have looked into the data that how data has been called into different sections,
so now creating cohort table and seeing values
•And now to visualize the cohort using heatmap we have called different colour functions,
to see how heatmap looks.
•As we have seen above to get the correct view of heatmap with
percentage and the functions,numbers in proper order
and to look in sorted order.
The final cohort heatmap looks like this and in this we can see
how in every month with repect to cohort index changes