Posts

Showing posts with the label aggregate

Aggregate a Pandas Dataframe by week and month

Aggregate a Pandas Dataframe by week and month The below Dataframe has information about launching of a program with only one column of dates: indate 2016-12-19 12:16:00 2016-12-19 12:21:00 2016-12-20 12:32:00 2016-12-20 12:34:00 2016-12-20 12:40:00 2016-12-21 13:47:01 2016-12-21 14:27:01 2016-12-21 14:43:00 2016-12-21 15:02:00 2016-12-22 15:16:00 2016-12-22 15:22:00 2016-12-22 15:25:00 2016-12-22 15:22:00 2016-12-22 15:25:00 ........ I'd like to aggregate to get number of launchings per day : indate number of launchings 2016-12-19 2 2016-12-20 3 2016-12-21 4 2016-12-22 5 ... And then also get the week of the launch, the day of launch and the no. of launchings: week ...