Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm building a resume parser that can extract 'skills' from a resume.

I'm extracting the resume skills by comparing the resume text with a dataset (a CSV file that contains about 38k technical skills). If there's a match, the matched words should be returned as a list.

What I have tried:

#Loading the dataset & viewing it's contents

Python
import pandas as pd

skills_data=pd.read_csv('/content/drive/My Drive/skills.csv')
df=skills_data.copy()

df.head()


Output-->
	Skill
0	supply chain engineering\n
1	bullet\n
2	commutations\n
3	pay equity\n
4	student retention\n



#Converting CSV values to list & checking the values
skill_list=[df.values.tolist()]
skill_list


Output-->
Python
[[['supply chain engineering\n'],
  ['bullet\n'],
  ['commutations\n'],
  ['pay equity\n'],
  ['student retention\n'],
  ['pulsar'],
  ['hevacomp\n'],
  ['travel insurance\n'],
  ['payback\n'],
  ['soaps\n'],
  ['erdf\n'],
  ['3d simulation\n'],
  ['中級\n'],
  ['server side\n'],
  ['filemaker server\n']]]


#Matching the Skills
y=text.split()
for sk in skill_list:
                 for txt in y:  
                    if sk==txt:
                          print (txt)


Output-->
Nothing



There are no errors in my code, but no output either. How do I match the words & how do I ensure that they are not case sensitive?
Posted
Updated 13-Sep-22 0:43am

1 solution

The problem is that each entry in your skill_list is a list with one element, inside a list, inside another list. So to access the actual words you need:
Python
for skill in skill_list[0]:
    print(skill[0])
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900