# import necessary libraries
import pandas as pd

# read data frame 
df = pd.read_csv('http://bit.ly/kaggletrain', nrows=10)

# select some or all features of the dataset
cols = ['Embarked', 'Sex', 'Age']
X = df[cols]

# import necessary libraries
from sklearn.preprocessing import OneHotEncoder
from sklearn.compose import make_column_transformer
from sklearn.compose import make_column_selector

# initialize OneHotEncoder()
onehot_transform = OneHotEncoder()

# make column transformer object & specify transformer
preprocessor = make_column_transformer(
    (onehot_transform, make_column_selector(dtype_include=object)),
    remainder = 'passthrough'

# print results