I have this dataframe:
dict_values = {'name':['John','Peter'], 'attach':['0001-test.jpg,0002-test.jpg','0003-test.jpg']}
name | attach
John | 0001-test.jpg,0002-test.jpg
Peter | 0003-test.jpg
I need to get the value before "-" and append into a list.
Like this:
name | attach
John | [0001,0002]
Peter | [0003]
How I do this?