Analyze additions and subtractions to/from a data set
I have a data set in the following form:
Product | Date
123 | 2019-01-01
456 | 2019-01-01
123 | 2019-01-02
123 | 2019-01-03
456 | 2019-01-03
123 | 2019-01-04
456 | 2019-01-04
789 | 2019-01-04
This is just a simplified version. The full set has ~300 products and four months of data. I would like to understand how the product set changed over time. It is obviously easy to calculate the count per day and see that I lost one product on Jan 2nd and gained one on Jan 4th, but then I do not know what product it was.
Is there a more systematic way of going about this? Ideally, the output would show me a list of days and what products dropped out/ were added that day. I thought about min(date), max(date) by-product before, but products can drop and be added repeatedly and I would not capture this back and forth this way.
Available environments are Python, SQL, and Excel.
Category Data Science