In python, I have the following df (headers in first row):
FullName FirstName
'MichaelJordan' 'Michael'
'KobeBryant' 'Kobe'
'LeBronJames' 'LeBron'
I am trying to split each record in "FullName" based on the value in "FirstName" but am not having luck...
This is what I tried:
df['Names'] = df['FullName'].str.split(df['FirstName'])
Which produces error:
'Series' objects are mutable, thus they cannot be hashed
Desired output:
print(df['Names'])
['Michael', 'Jordan']
['Kobe', 'Bryant']
['LeBron', 'James']