I want to highlight records in the dataframe and csv files based on the value on a cell ?
i tried to create a function and apply this function on the dataframe but it did not highlight any record.
the output must be :
code:
def_test_twtr_preds= pd.read_excel(path,names=col_names)
def highlight_sentiment(status):
if status == "Positive":
return ['background-color: yellow']
else:
return ['background-color: white']
def_test_twtr_preds.style.apply(highlight_sentiment,axis =1)
where is the error ??


