When building a estimator (sklearn), if you forget to return self in the fit function, you get the same error.
class ImputeLags(BaseEstimator, TransformerMixin):
def __init__(self, columns):
self.columns = columns
def fit(self, x, y=None):
""" do something """
def transfrom(self, x):
return x
AttributeError: 'NoneType' object has no attribute 'transform'?
Adding return self
to the fit function fixes the error.