I want to create categories based on particular string of keyword found true than assigned category else "other".
For example - if "health" is found in a column, name that keyword row as "HEALTH", if "therapist" then 'THERAPIST'
- create a "category" column through code
- assign categories based on condition
I was able to do on Excel by creating a table and using index match and want to switch to Python to apply this on large dataset,
Below is the sample data,
| keyword | category |
|---|---|
| HR Consultancy UK-d-uk-159_bing | other |
| it support COMPANY LONDON-D-UK-G1161_bing | other |
| global sales training platform openings | sales |
| tele private practice therapist | therapist |
| asset grant management system | other |
| digital team project management solution openings | other |
| global training platform openings | other |
| tele practice therapist | therapist |
| global sales training platform openings | sales |
| tele health practice | health |
| asset grant management | other |
| digital team project management solution | other |