'How to Vectorize python function

I have made a resume parser but to parse my resumes, I am using a for loop to run my parse function over each resume. Is there a way to vectorize this approach? I tried to use .apply() function by putting my resumes in a Series but it doesn’t help in performance. Also, I have heard of pandas UDF for vectorization can help. Is that true? Below is my code.

start=time.time()
resume_list,resume_name=form_list()
final=[]
for resume in resume_list:
    final.append(extract_everything(resume))
final_dataframe=pd.DataFrame(final,index=resume_name)
print(f"{time.time()-start} seconds")  


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source