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
df.replace(to_replace=['set', 'test'], value=[1, 2]) from @Ishnark comment on accepted answer.
df.replace(to_replace=['set', 'test'], value=[1, 2])