Variables with levels that simply name a group are said to be measured on a nominal scale. Categorical variables can also be measured using an ordinal scale, which means that the levels of the ...
df = pd.DataFrame(data) df_encoded = pd.get_dummies(df, columns=['Color']) print(df_encoded) Ordinal Encoding is used when categorical variables have an inherent order or ranking. It converts ...