
<SYSTEM_TASK:>
Given the following text problem statement, write Python code to implement the functionality described below in problem statement
<END_TASK>
<USER_TASK:>
Problem:
use one hot encoding on the given dataset named 'onehotend_data.csv' on column 'town'

<ASSISTANT_TASK:>
Python Code::
import pandas as pd
from sklearn.preprocessing import OneHotEncoder
from sklearn.compose import make_column_transformer
ohe = OneHotEncoder()
df = pd.read_csv('onehotend_data.csv')
ohe.fit(df[['town']])
ct = make_column_transformer((OneHotEncoder(categories = ohe.categories_), ['town']), remainder = 'passthrough')

<END_TASK>
