I'm trying to create an ascending list of integers by group in pandas:
Group Date
A 2000-01-01
A 2000-01-12
A 2000-01-15
A 2000-10-01
B 2005-02-05
B 2006-04-10
B 2010-08-20
Would become this:
Group Date obs_num
A 2000-01-01 1
A 2000-01-12 2
A 2000-01-15 3
A 2000-10-01 4
B 2005-02-05 1
B 2006-04-10 2
B 2010-08-20 3