Question 20
Consider the Following codeblock for the given subquestions.
import pandas as pdimport numpy as npfrom sklearn.preprocessing import OneHotEncoder, StandardScalerfrom sklearn.compose import ColumnTransformer
data = {"fruits": ['apple','orange', 'banana', 'orange', 'apple'], "price": [10,20,5,20,10], 'color': ['red', 'orange', 'yellow', 'orange', 'red']}df = pd.DataFrame(data)
transformers = [ ('Ohe', OneHotEncoder(), [0,2]), ('scaler', StandardScaler(), [1])]ct = ColumnTransformer(transformers = transformers)
transformed_df = ct.fit_transform(df)Based on the above data, answer the given subquestions.