I have a df:
   name    sample
 1  a      Category 1: qwe, asd (line break) Category 2: sdf, erg
 2  b      Category 2: sdf, erg(line break) Category 5: zxc, eru
...
30  p      Category 1: asd, Category PE: 2134, EFDgh, Pdr tke, err 
I need to end up with:
   name    qwe   asd   sdf   erg   zxc   eru 2134  EFDgh  Pdr tke  err
 1  a       1     1     1     1    0     0    0     0       0       0
 2  b       0     0     1     1    1     1    0     0       0       0
...
30  p       0     1     0     0    0     0    0     1       1       0
I'm honestly not even sure where to begin with this one, my first though is to split it at the line break but I kind of get lost after.
 
     
    