I have a simple scikit-learn
You can't call a transform method on a pipeline which contains Non-transformer on last step. If you wan't to call transfrom on such pipeline last estimator must be a transformer.
Even method doc says so:
Applies transforms to the data, and the transform method of the final estimator. Valid only if the final estimator implements transform.
Also, there is no method to use every estimator except last one. Thou you can make your own Pipeline, and inherit everything from scikit-learn's Pipeline, but add one method, something like:
def just_transforms(self, X): """Applies all transforms to the data, without applying last estimator. Parameters ---------- X : iterable Data to predict on. Must fulfill input requirements of first step of the pipeline. """ Xt = X for name, transform in self.steps[:-1]: Xt = transform.transform(Xt) return Xt