Chapter 4: Combining, Reshaping, and Aggregating Data
When we must deal with multiple datasets simultaneously, it's important to have the right tools that allow us to combine said datasets into a homogeneous and uniform one. As we saw in the previous chapters, Optimus provides us with transformation operations that allow us to prepare a dataset whose format does not coincide with another, so that we can combine them correctly later. Once transformed, it is possible to combine them in various ways, such as via concatenation or union.
In this chapter, we'll learn how to concatenate and merge multiple datasets using Optimus and review more complex transformations such as reshaping and pivoting. To finish, we will learn how to aggregate data and how to apply aggregation over a specific group of data.
Some of these concepts are maybe already known to those of you who have come from the relational database world. If you are a novice, then don't worry – we will...