Data Types

Before analysing any dataset, it's important to understand what type of data each column represents, since that determines which statistical methods and visualisations are appropriate.

Qualitative (Categorical) Data

Describes qualities or categories rather than numbers - for example, city names, gender, or product colour. Qualitative data splits further into:

  • Nominal - categories with no natural order, such as "Red", "Blue", "Green".
  • Ordinal - categories with a meaningful order but no fixed numeric gap, such as "Low", "Medium", "High".

Quantitative (Numerical) Data

Represents measurable quantities. Quantitative data splits further into:

  • Interval - numeric data with meaningful gaps but no true zero, such as temperature in Celsius.
  • Ratio - numeric data with meaningful gaps and a true zero, such as height, weight, or income.

Discrete vs Continuous

Quantitative data can also be described as discrete (countable whole values, like the number of students in a class) or continuous (any value within a range, like a person's exact height).

import pandas as pd

df = pd.DataFrame({
    "City": ["Noida", "Delhi"],          # nominal
    "Rating": ["Good", "Excellent"],      # ordinal
    "TemperatureC": [28.5, 31.2],         # interval
    "Income": [45000, 62000]              # ratio
})
print(df.dtypes)
Identifying data type correctly matters practically too - for instance, calculating an "average" doesn't make sense for nominal data like city names, even though Pandas won't stop you from trying.

Coming Up Next

Next, you'll get introduced to Exploratory Data Analysis (EDA) as a formal step in the Data Science process.

Ready to Master Data Science?

Join Uncodemy's Data Science Course and build real, job-ready skills with expert mentors.

Explore Course