Exercise

Finding categorical variables

Categorical variables are variables that receive a limited number of values that describe a category. They can be of two types:

  • Ordinal – variables with two or more categories that can be ranked or ordered (e.g. “low”, “medium”, “high”)
  • Nominal – variables with two or more categories that do not have an intrinsic order (e.g. “men”, “women”)

In this exercise, you will find the categorical variables in the dataset. To do that, first of all, you will import the pandas library and read the CSV file called "turnover.csv". Then, after viewing the first 5 rows and learning (visually) that there are non-numeric values in the DataFrame, you will get some information about the types of variables that are available in the dataset.

Instructions

100 XP
  • Import pandas (as pd) to read the data.
  • Read "turnover.csv" file and save it in a DataFrame called data.
  • Take a quick look to the first 5 rows of data.
  • Get some info()-rmation on the types of variables in data.