Get startedGet started for free

When to use transform()?

The .transform() function applies a function to all members of each group. Which of the following transformations would produce the same results in the whole dataset regardless of groupings?

This exercise is part of the course

Writing Efficient Code with pandas

View Course

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise