def minute_frame_to_session_frame(minute_frame, calendar):
 how = OrderedDict(((c, _MINUTE_TO_SESSION_OHCLV_HOW[c]) for c in minute_frame.columns))
 return minute_frame.groupby(calendar.minute_to_session_label).agg(how)

def minute_frame_to_session_frame ( minute_frame , calendar ) : how = OrderedDict ( ( ( c , _MINUTE_TO_SESSION_OHCLV_HOW [ c ] ) for c in minute_frame . columns ) ) return minute_frame . groupby ( calendar . minute_to_session_label ) . agg ( how )
resample a dataframe with minute data into the frame expected by a bcolzdailybarwriter .