Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Label Encoding of the Target Variable | Processing Categorical Data
Data Preprocessing

Label Encoding of the Target VariableLabel Encoding of the Target Variable

Let's go straight to the main thing - label encoding implements everything the same as ordinal encoder, but:

  • Methods work with different data dimensions;
  • The order of the categories is not important for label encoding.

How to use this method in Python:

Tarea

Read the dataset 'salary_and_gender.csv' and encode the output column 'Gender' with label encoding.

¿Todo estuvo claro?

Sección 3. Capítulo 4
toggle bottom row
course content

Contenido del Curso

Data Preprocessing

Label Encoding of the Target VariableLabel Encoding of the Target Variable

Let's go straight to the main thing - label encoding implements everything the same as ordinal encoder, but:

  • Methods work with different data dimensions;
  • The order of the categories is not important for label encoding.

How to use this method in Python:

Tarea

Read the dataset 'salary_and_gender.csv' and encode the output column 'Gender' with label encoding.

¿Todo estuvo claro?

Sección 3. Capítulo 4
toggle bottom row
some-alt