I have the following data frame:
a b x
0 id1 abc 123 tr 2
1 id2 abd1 124 tr 6
2 id3 abce 126 af 9
3 id4 abe 128 nm 12
From column b, for each item, I need to extract the substrings before the first space. Hence, I need the following result:
list_of_strings = [abc, abd1, abce, abe]
Please advise