basicallywe're making dictionary in python that maps the letter to the number and the letter to the value sowe want to convert all our ys to and ns to so will mean yes and will mean no what we do is just take the hired column from the dataframeand call nbq on itusing dictionary this will go through the entire hired columnin the entire dataframe and use that dictionary lookup to transform all the entries in that column it returns new dataframe column that ' putting back into the hired column this replaces the hired column with one that' been mapped to and we do the same thing for employedtop-tier school and internedso all those get mapped using the yes/no dictionary sothe ys and ns become and instead for the level of educationwe do the same trickwe just create dictionary that assigns bs to ms to and phd to and uses that to remap those degree names to actual numerical values so if go ahead and run that and do ifbe againyou can see that it workedall my yeses are 'smy nos are 'sand my level of education is now represented by numerical value that has real meaning next we need to prepare everything to actually go into our decision tree classifierwhich isn' that hard to do thatwe need to separate our feature informationwhich are the attributes that we're trying to predict fromand our target columnwhich contains the thing that we're trying to predict to extract the list of feature name columnswe are just going to create list of columns up to number we go ahead and print that out gfbuvsft mjtu egdpmvnot gfbuvsft