Glossary

When to use `.map()` vs `.replace()`:

Use `.map()` when you want to recode every value and need strict control — any unmapped value becomes `NaN`, signaling a gap in your mapping. - Use `.replace()` when you want to fix specific known problems while leaving other values alone.

Learn More

Related Terms