Is there anyway to use the mapping function or something better to replace values in an entire dataframe?
I only know how to perform the mapping on series.
I
The simplest way to replace any value in the dataframe:
df=df.replace(to_replace="set",value="1") df=df.replace(to_replace="test",value="2")
Hope this will help.