Skip to content
RED SAG Skills
mediumStudy question · answer published in Pandas interview questions, so no pointspythonpandasdata-cleaning

map and replace on unknown codes

s holds "M", "F" and "X". What do these two lines return?

codes = {"M": "Male", "F": "Female"}
a = s.map(codes)
b = s.replace(codes)
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions