# What are the best practises to decide whether a variable is categorical?

What are some of the systematic ways to categorise variables into categorical or numeric? I believe using only intuition in such scenarios can many-a-times lead to major irreversible errors. What are the best strategies when categorising variables?

For example, the dataframe I'm working has several categorical variables such as is_holiday that has labels for several holidays. However certain variables like visibility_in_miles suggest that those too need to be treated as categorical. part of the reason is that while most variables have hundreds of unique values, some have only 9 points.

• So would you suggest that dew_point for example, that has only values from 1 to 9 would be categorical since it suggests that there is no order and are mutually exclusive values? – Shiv_90 Aug 23 '19 at 13:52
• I don't what is dew_point in your data set. If it is dew point temperature en.wikipedia.org/wiki/Dew_point, that is numeric because it is measured in degrees. Temperature degrees have consent differences (regardless of range). – Brian Spiering Aug 23 '19 at 13:56