The difference is that map
will execute one function on every element of the Dataset
separately, whereas apply
will execute one function on the whole Dataset
at once (such as group_by_window
given as example in the documentation).
The argument of apply
is a function that takes a Dataset
and returns a Dataset
when the argument of map
is a function that takes one element and returns one transformed element.