counted = df.group_by([date_index.year, date_index.month, date_index.day]).agg(
    {'column_to_sum': 'sum'}).reset_index().rename(columns={'level_1':
    'year', 'level_2': 'month', 'level_3': 'day'})
Pandas group hourly data into daily sums with date index