def dataset(self, instruments, fields, start_time=None, end_time=None, freq='day'):
    instruments_d = self.get_instruments_d(instruments, freq)
    column_names = self.get_column_names(fields)
    cal = Cal.calendar(start_time, end_time, freq)
    if (len(cal) == 0):
        return pd.DataFrame(columns=column_names)
    start_time = cal[0]
    end_time = cal[(- 1)]
    data = self.dataset_processor(instruments_d, column_names, start_time, end_time, freq)
    return data
def dataset(self, instruments, fields, start_time=None, end_time=None, freq='day'):
    instruments_d = self.get_instruments_d(instruments, freq)
    column_names = self.get_column_names(fields)
    cal = Cal.calendar(start_time, end_time, freq)
    if (len(cal) == 0):
        return pd.DataFrame(columns=column_names)
    start_time = cal[0]
    end_time = cal[(- 1)]
    data = self.dataset_processor(instruments_d, column_names, start_time, end_time, freq)
    return data