What is the difference between apply, map and applymap?
intermediateAnswer
map works element-wise on a Series, often with a dictionary: df['code'].map({'A': 'Alpha'}).
apply works on a Series element-wise, or on a DataFrame row-wise or column-wise depending on axis.
applymap works element-wise across an entire DataFrame — largely superseded by DataFrame.map in recent pandas versions.
All three run Python per element or per row, so all three are slow relative to vectorised operations. They are convenience, not performance.
Related