Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def strip_word(s:str):
- ''' function to strip parts of word '''
- # n is the start position
- n = s.find('/')
- n = n+2 # adjust for spaces
- # m is the end position
- m = s.find(') ')
- m = m+1 # adjust for zero index
- s_new = s[n:m]
- return s_new
- df['Track3'] = df['menu_hint'].apply(strip_word)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement