Course Content
Data Preprocessing
2. Processing Quantitative Data
3. Processing Categorical Data
4. Time Series Data Processing
6. Moving on to Tasks
Data Preprocessing
Label 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.
![](https://codefinity-content-media.s3.eu-west-1.amazonaws.com/9c23bf60-276c-4989-a9d7-3091716b4507/processed_images/img_3/img3.png)
How to use this method in Python:
Task
Read the dataset 'salary_and_gender.csv'
and encode the output column 'Gender'
with label encoding.
Everything was clear?
Course Content
Data Preprocessing
2. Processing Quantitative Data
3. Processing Categorical Data
4. Time Series Data Processing
6. Moving on to Tasks
Data Preprocessing
Label 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.
![](https://codefinity-content-media.s3.eu-west-1.amazonaws.com/9c23bf60-276c-4989-a9d7-3091716b4507/processed_images/img_3/img3.png)
How to use this method in Python:
Task
Read the dataset 'salary_and_gender.csv'
and encode the output column 'Gender'
with label encoding.
Everything was clear?