1

How do I Differentiate between Ordinal and Nominal variables using Python?

The code needs to be dynamic and must be able to identify the difference for any data set that comes in. Is it possible to achieve this using python program?

The output must be the type of the variable (Nominal or Ordinal).

Vishwa
  • 11
  • 1

2 Answers2

4

There's no practical way to do this automatically. For example: if some data uses integers for IDs, how is your algorithm supposed to know that these are nominal and not ordinal?

This distinction can only come from subject matter expertise and familiarity with the data.

David Marx
  • 6,647
  • 1
  • 25
  • 43
1

A computer program can't differentiate between ordinal and nominal. You need to use your brain and your substantive knowledge to do that.

Peter Flom
  • 94,055
  • 35
  • 143
  • 276