I’m doing the Data Scientist: Natural Language Processing Specialist career path, and I’ve gotten to the point where we’re doing variable types. On the variable types review page, it asks me to use cat.codes, but it never went over this in the lesson. Is anyone willing to explain exactly what cat.codes means and does?
Thank you for the help,
mews_mochi <3
P.S : it also asks me to use this code on the census variables project, not sure how I’m supposed to know that without looking at the hint
cat.codes assigns a numerical value to the (ordinal) categorical variables. It returns an array of numbers that are paired with the categorical variables (as well as the index). This allows you to do summary statistics on a column of data.
Also, it’s okay to look at the hint if you don’t understand a concept.