The variable (Grade) takes three character values "A" "B" "C" and has been changed to a factor. I am trying to replace "C" with "D".
For instance, I am trying to run:
data_set['Grade'][data_set['Grade'] == 'C'] <- "D"
levels(data_set$Grade)
When checking levels of the factor, the levels are still "A" "B" "C". When working with a character variable that is a factor, is there a different approach to replacing a specific value of a column?