Summary

Go over a summary of what we have learned so far in this chapter.

In this chapter, we learned about the following concepts.

Quantitative vs. qualitative data

  • Data can be quantitative or qualitative. Quantitative or numerical data contains numerical variables that can be discrete or continuous. Qualitative or categorical data contains categorical variables that define characteristics that can be nominal or ordinal.

  • Since we can’t perform mathematical operations on categorical data, we must deal with them before feeding them to our machine learning model. So, we can create dummies for the categorical variables present in our dataset.

Creating dummies

  • We can convert categorical variables into dummy variables, which can be conveniently achieved using the pandas dummies module.

  • While specifying the data and columns parameters, the drop first parameter exists that will return k1k-1 dummies, where kk is the number of unique values in the passed categorical column.

Get hands-on with 1400+ tech skills courses.