I have a dataframe with two series:
- Date of Call
- Sales Rep
The dataframe is a list is all calls to customers made by a sales force over the course of one year - one row for each call. The date field is the date of the call, and the "Sales Rep" is the person who made the call. There are approximately 250k rows in the dataframe.
I'd like to summarize this data into a new dataframe with the index being the sales reps and the columns being the number of calls by month i.e. one row for each sales rep and one series for each month. I thought pd.Pivot was the way to go but that didn't work.
What's the easiest and most pythonic way to achieve this results?