In the table below, the Start and End dates represent a period of time in which a unique identifyer is counted. My goal is count the number of times the unique identifyer falls between the date, but show it on a monthly basis. I'd also like to count the number of times that a category falls in that date range.
I'm new at working with table data and pandas so I'm a bit lost. Thanks a lot in advance for the help.
Example input data:
| Start Date | End Date | Unique Identifyer | Category |
|---|---|---|---|
| 2019-04-17 | 2020-04-17 | ID 1234 | A |
| 2019-05-20 | 2021-04-03 | ID 3492 | B |
| 2019-05-20 | 2021-04-03 | ID 7376 | C |
| 2019-04-18 | 2021-04-03 | ID 9813 | A |
| 2019-06-20 | 2021-04-03 | ID 6342 | A |
| 2019-06-20 | 2021-04-03 | ID 6455 | B |
| 2019-07-20 | 2021-04-03 | ID 6342 | A |
| 2019-06-20 | 2021-04-03 | ID 6455 | B |
| etc... | etc... | etc... | etc... |
example of output:
| Date | Total_Vol | count_A | count_B | count_c |
|---|---|---|---|---|
| Apr-2019 | 2 | 2 | 0 | 0 |
| May-2019 | 4 | 2 | 1 | 1 |
| Jun-2019 | 7 | 3 | 3 | 1 |
| Jul-2019 | 8 | 4 | 3 | 1 |


