def _compute_start_end(df, start, end):
result = {}<EOL>time_dict = {'<STR_LIT:start>': start, '<STR_LIT:end>': end}<EOL>totals = df.groupby('<STR_LIT:date>').agg({'<STR_LIT:value>': sum}).reset_index()<EOL>for time_name, time in time_dict.items():<EOL><INDENT>if not totals[totals['<STR_LIT:date>'] == time['<STR_LIT:id>']].empty:<EOL><INDENT>value = totals.loc[<EOL>totals['<STR_LIT:date>'] == time['<STR_LIT:id>'], '<STR_LIT:value>'<EOL>].values[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>value = <NUM_LIT:0><EOL><DEDENT>result[time_name] = pd.DataFrame([{<EOL>'<STR_LIT:value>': value,<EOL>'<STR_LIT:label>': time['<STR_LIT:label>'],<EOL>'<STR_LIT>': time['<STR_LIT:label>']<EOL>}])<EOL><DEDENT>return result['<STR_LIT:start>'], result['<STR_LIT:end>']<EOL>
Compute two dataframes with value for start and end
Args:
    totals(dataframe):

Returns: Dataframe, Dataframe