Remove substring from column based on another column

So, I tried this and it worked pretty well:

dfTest['bar'] = dfTest.apply(lambda row : row['foo'].replace(str(row['date']), ''), axis=1)

Leave a Comment