from sklearn.linear_model import LogisticRegression
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
import pandas as pd
# create a DataFrame
df = pd.DataFrame({'feature1': [1, 2, 3, 4],
'feature2': [5, 6, 7, 8], 'target': [0, 0, 1, 1]})
# define features and target
X = df[['feature1', 'feature2']]
y = df['target']
# create a pipeline that scales the data and fits a logistic regression classifier
clf = Pipeline([('scaler', StandardScaler()),
('classifier', LogisticRegression())])
# fit the pipeline to the data and predict the target values for new data
clf.fit(X, y)
new_data = pd.DataFrame({'feature1': [5, 6], 'feature2': [9, 10]})
predictions = clf.predict(new_data)
print(predictions)