<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:
Are you able to train a DecisionTreeClassifier with string data?
<ASSISTANT_TASK:>
Python Code:
import numpy as np
import pandas as pd
from sklearn.tree import DecisionTreeClassifier
X = [['asdf', '1'], ['asdf', '0']]
clf = DecisionTreeClassifier()
from sklearn.feature_extraction import DictVectorizer
X = [dict(enumerate(x)) for x in X]
vect = DictVectorizer(sparse=False)
new_X = vect.fit_transform(X)
<END_TASK>