map() (Pandas)

Series.map() substitutes or transforms each value in a Series, using a function, a dict, or another Series as the lookup. It is the simplest way to recode…