def transform(self, X, y=None): """Returns a copy of the DataFrame X with only four columns: 'dow', 'hour', 'month', 'year'""" a = extract_time_features(X.copy())[['dow', 'hour', 'month', 'year']] return a
def transform(self, X, y=None): """Returns a copy of the DataFrame X with only four columns: 'dow', 'hour', 'month', 'year'""" X_time = extract_time_features(X, self.time_column) return X_time[['dow', 'hour', 'month', 'year']]