from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import cross_val_score
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 logistic regression classifier
clf = LogisticRegression()
# use cross-validation to evaluate the classifier's performance
scores = cross_val_score(clf, X, y, cv=2)
print(scores)