Skip to content
Project: Tech Talent Recruiting with Regex
As a Data Analyst at a leading global HR consultancy, your mission is to delve into an extensive database of resumes to identify suitable candidates for tech-focused roles. This task involves using regular expressions to extract key data points and applying data preprocessing techniques to organize this information effectively.
Dataset Summary
resumes.csv
Column | Data Type | Description |
---|---|---|
ID | float | Unique identifier for each resume. |
Resume_str | object | Full text of the resume, rich with details for analysis. |
Category | object | Job category of the resume, indicating the field of expertise. |
Let's Get Started!
Embark on this analytical journey to harness advanced data analysis techniques for real-world HR challenges. This project is your chance to impact the hiring process by ensuring that tech talent finds their ideal job. Let's begin this exciting journey!
import pandas as pd
import re
# Load the resume dataset from a CSV file into a DataFrame
resumes = pd.read_csv('resumes.csv')
resumes.sample(3)
# Start coding here!
# Use as many cells as you need.
def get_job(resume):
job_match = re.search(r"^([A-Z\s\.\,\-]+)\b", resume)
job_title = ""
if job_match is not None:
job_title = job_match.group(0).strip()
return job_title
def get_skills(resume):
skills_matches = re.findall(r"\b(python|sql|r|excel)\b", resume, flags=re.IGNORECASE)
skills = [skill.title() for skill in list(set(skills_matches))]
return ", ".join(skills)
def get_education(resume):
education_matches = re.findall(r"\b(PHD|MCs|Master|BCs|Bachelor)\b", resume, flags=re.IGNORECASE)
education = [edu.title() for edu in list(set(education_matches))]
return ", ".join(education)
resumes['job_title'] = resumes['Resume_str'].apply(get_job)
resumes['tech_skills'] = resumes['Resume_str'].apply(get_skills)
resumes['education'] = resumes['Resume_str'].apply(get_education)
resumes_filtered = resumes[(resumes['job_title'] != "") & (resumes['tech_skills'] != "") & (resumes['education'] != "")]
candidates_df = resumes_filtered[["ID", "job_title", "tech_skills", "education"]]
candidates_df.columns = candidates_df.columns.str.lower()
candidates_df.dropna(inplace=True)
candidates_df.sample(5)