name value_1
dd3 what, _ is
dd4 what, _ is
How to replace '_' from value_1 column with whole string from name column?
Desired output for value_1 column
value_1
what, dd3 is
what, dd4 is
I have tried with this:
df['value_1'] = df['value_1'].apply(lambda x:x.replace("_", df['name']))
And I got this error :expected a string or other character buffer object