Replacing character values with NA in a data frame January 27, 2023 by Tarik This: df[df == "foo"] <- NA