How to remove features from a sklearn pipeline after it has already been fitted?
Standard Scalar trained on 30 features so it expects 30 features only. One simple hack you can do is, you can create a new Standard Scalar and train with those 20 features, and replace your pipeline Standard Scalar with the new one.
For the LogisticRegression, get the non zero weights and set those weights to the new model with 20 features without any training like below.
model.coef_ = numpy_array_of_non_zero_coef
model.intercept_ = numpy_array_of_intercept