How can I add a simple counter column in a pandas dataframe which resets when the date changes? The date is a to_datetime object. Here is the desired result:
Date Counter
2009-03-20 0
2009-03-20 1
2009-03-20 2
2009-03-20 3
2009-03-20 4
2009-03-20 5
2009-03-25 0
2009-03-25 1
2009-03-25 2
2009-03-25 3
2009-03-26 0
2009-03-26 1
2009-03-26 2
2009-03-26 3
2009-03-26 4
2009-03-26 5