I have Pandas Dataframe named df. I want to replace each value in sentence column within start and end with X.
df = pd.DataFrame({'sentence': ['I eat chicken', 'I drive car'],
'start': [3, 3],
'end': [6,8]})
For example that will return I X chicken and I X car in sentence column. I try using apply and replace, but it returns error.