Variables For Data Science

shankar saripalli
2 min readAug 22, 2020

Variable types are very important and their importance can be emphasized by the fact that they in a way could determine the data wrangling/cleaning techniques that need to be employed as well ML Models we may have to choose.

Broadly variables used in Data science can be classified into two categories by the datatype they have

Numeric:Numeric variables are those that describe a measurable quantity .

Numeric variables can further be classified as below.

Continuous Variable: Its kind of quantitative variable used to describe the data that is measurable.Continuous variable can take on any value.

Ex: Salary of a Person , Weight of Person

Discrete Variable : While Continuous variable can take on any value ,Discrete variables can take only finite values

Ex:Number of cars sold by a dealer would be a whole number like 1 ,2 ,3 but not something like 2.5 .

Categorical : As the name suggests, is used to represent categories or labels. For instance, a categorical variable could represent Student’s grade, the values of A, B, C, or Fail are ordered, A being the highest grade and Fail the lowest

Another common example is Gender that can take either Male or Female.

Categorical Variables can further be classified as below.

Nominal : Nominal variable is a type of variable that is used to name, label or categorize particular attributes that are being measured

Ex: Name of person ,Gender etc

Ordinal : Ordinal variable takes values with order or rank

Ex: Grades by a Student as below

  1. Very Good
  2. Good
  3. Average

--

--