def __init__(self, input_width, label_width, shift, train_df, val_df, test_df, label_columns=None):
    self.train_df = train_df
    self.val_df = val_df
    self.test_df = test_df
    self.label_columns = label_columns
    if (label_columns is not None):
        self.label_columns_indices = {name: i for (i, name) in enumerate(label_columns)}
    self.column_indices = {name: i for (i, name) in enumerate(train_df.columns)}
    self.input_width = input_width
    self.label_width = label_width
    self.shift = shift
    self.total_window_size = (input_width + shift)
    self.input_slice = slice(0, input_width)
    self.input_indices = np.arange(self.total_window_size)[self.input_slice]
    self.label_start = (self.total_window_size - self.label_width)
    self.labels_slice = slice(self.label_start, None)
    self.label_indices = np.arange(self.total_window_size)[self.labels_slice]
def __init__(self, input_width, label_width, shift, train_df, val_df, test_df, label_columns=None):
    self.train_df = train_df
    self.val_df = val_df
    self.test_df = test_df
    self.label_columns = label_columns
    if (label_columns is not None):
        self.label_columns_indices = {name: i for (i, name) in enumerate(label_columns)}
    self.column_indices = {name: i for (i, name) in enumerate(train_df.columns)}
    self.input_width = input_width
    self.label_width = label_width
    self.shift = shift
    self.total_window_size = (input_width + shift)
    self.input_slice = slice(0, input_width)
    self.input_indices = np.arange(self.total_window_size)[self.input_slice]
    self.label_start = (self.total_window_size - self.label_width)
    self.labels_slice = slice(self.label_start, None)
    self.label_indices = np.arange(self.total_window_size)[self.labels_slice]