I have a dataframe:
id val1 val2
1 "he bought 0" "0"
2 "0" "0-the student"
i'd like to replace 0 with emptiness ("") but only in cases of "0". so for example "0-the student" shouldn't turn into "-the student". How could i do that? desired result is:
id val1 val2
1 "he bought 0" ""
2 "" "0-the student"
str.replace("0", "") will change "0-the student" and "he bought 0" too