def aggregate_hourly_daily(hourly):
    """Aggregates an hourly timeseries to a daily one."""
    if len(hourly) < 24:
        print('insufficiently short time series')
        return
    daily = []
    for i in range(0, len(hourly) - 23, 24):
        daily.append(sum(hourly[i:i + 24]))
    return daily
