...

/

Coding Exercise: Clean the Employee Survey Data

Coding Exercise: Clean the Employee Survey Data

Practice fixing messy real-world data using pandas to make it analysis-ready.

We'll cover the following...

Scenerio

You’re a junior data scientist at a mid-sized company. HR has just shared the results of an internal employee satisfaction survey, but the data is messy! Your job is to clean and prepare this dataset for further analysis. You’ll need to handle duplicated data, missing values, and normalize certain columns, just like in a real-world workplace.

Dataset

Here’s a sample DataFrame (df) you’ll work with:

Employee Data

employee_id

department

tenure_years

satisfaction_level

remote_status

101

HR

2

4.2

Yes

102

HR

3

NaN

No

103

Finance

4

3.9

Yes

104

NaN

NaN

2.5

No

104

Finance

NaN

2.5

No

Task

Clean the df DataFrame by performing the ...