apply() |
Rows or columns |
Apply a custom function to each row/column |
May change shape |
Complex row/column logic. |
transform() |
Rows or columns |
Transform while preserving alignment |
Same shape |
Standardization, normalization, group-wise transformations |
map() |
Individual cells |
Element-wise transformation |
Same shape |
Transform every value |
pipe() |
Whole DataFrame/Series |
Pass object through a function |
Depends on function |
Build readable transformation pipelines (e.g. dropna -> drop col) |
agg() / aggregate() |
Rows or columns |
Compute summaries/statistics |
Usually reduced |
mean, sum, min, max, etc. |
|
|
|
|
|