'Finding and comparing unique values Grouped by Datetime Quarters python
I'm working with an extremely large dataset in a Pandas Dataframe. I'm now trying to understand on a quarterly basis:
- how many UNIQUE sellers have COMMENCED using my product, and
- how many UNIQUE sellers have CEASED using my product.
For example, I have a dataset that looks something like this:
I have a hypothesis on how to proceed, but I'm too terrible at python to see either of the major steps through at this stage. In any case, they are:
..................................................................................
Part 1. Create Lists I've got a hunch that a good place to start might be to create a list of all the UNIQUE SELLERS in a quarter. My 'Month' column is formatted to datetime format, but none of the formulas I've been trying have helped from a 'unique count of seller names' perspective.
..................................................................................
Part 2. Compare Them Once I've got the lists, I then need to compare them to identify growth/attrition rates.
Any help would be very much appreciated. Thank you so much in advance@
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|