To make a decision tree, all data has to be numerical. We have to convert the non numerical columns 'Nationality' and 'Go' into numerical values. Pandas has a map() method that takes a dictionary with information on how to convert the values. {'UK': 0, 'USA': 1, 'N': 2} Means convert the values 'UK' to 0, 'USA' to 1, and 'N' to 2. #MachineLearning #DataScience #Python #ArtificialIntelligence #AI #ScikitLearn #DataAnalysis #ML

To view or add a comment, sign in

Explore content categories