I have a table with three columns:
- product names
- product use case/usage
- user ID
I want to extract for each product, all the use-cases. Then for each of these use-cases, the percentage of users using the product. Here is an example of the data:
product-name use-case user-ID A therapy X B relaxation X C health Y A relaxation Z - I want to groupby the product names.
- Then for each product name I want to groupby the use-cases.
- Then for each use case (related to a product name) I want to see the percentage of users (i.e. based on their user-IDs). My desired result is to say that xx% of product A's users are using this product for relaxation...
The output should look like:
For example, I can say 50% of Product A users are using it for therapy and the other 50% for relaxation.
Thanks a lot.
