I’m fairly new to pandas and struggling to understand how to use it to allow me to better understand user behavior in my dataset. For each day in my dataset users may have an entry indicating they interacted with some content. I want to understand over time are the same users repeatedly in the data set vs. unique users.
For example, I would like to understand with pandas the number of unique users and number of users who like user #2 repeat.
ds | userid | unique_content_id |
---|---|---|
2024-01-26 | 1 | 8fd |
2024-01-26 | 2 | 7rt |
2024-01-27 | 4 | 6as |
2024-01-28 | 2 | 45t |