I have a data set like this and I want to split the name column into 2 columns where the Name column is overwritten as 'name and surname' and the 'middle name' column only contains the middle name, including the brackets.
In [1]: dd = {'Name' : ['Daniel [Jack] Horn', 'Marcus [Martin] Dwell', 'Greg [Alex] Waltz']}
In [2]: dd_frame = pd.DataFrame(dd)
In [3]: dd_frame
Out[3]:
Name
0 Daniel [Jack] Horn
1 Marcus [Martin] Dwell
2 Greg [Alex] Waltz
The expected output is
Name MiddleName
0 Daniel Horn [Jack]
1 Marcus Dwell [Martin]
2 Greg Waltz [Alex]
What would be a simple way to do this without splitting into 3 columns and merging the 1st and 3rd?