from sklearn.datasets import load_iris
from sklearn.compose import ColumnTransformer
from sklearn.preprocessing import FunctionTransformer, StandardScaler
from sklearn.pipeline import Pipeline
import pandas as pd

# Load the Iris dataset
iris = load_iris()
df = pd.DataFrame(, columns=iris.feature_names)

# Define the transformer
ct = ColumnTransformer(
        ('standard', StandardScaler(), ['petal length (cm)', 'petal width (cm)']),
        ('pass', 'passthrough', ['sepal length (cm)', 'sepal width (cm)'])

# Define the pipeline
pipe = Pipeline([
    ('transformer', ct),
    ('scaler', StandardScaler())

# Fit and transform the pipeline on the dataset
transformed_data = pipe.fit_transform(df)

# Display the transformed data