Most of the datasets we meet in real life need a significant amount of restructuring before commencing with the actual purpose e.g. data analysis. In this section, we cover how to modify the structure of a dataset.
This section is organized as follows:
Joining: Combining information from multiple tables or data frames into a single table or data frame. We use the SQL-style joins: Left Join, Right Join, Inner Join, and Full Join, to specify how the data should be combined.
Appending: Appending multiple data frames to each other either vertically where we bind the rows of multiple data frames into a longer data frame, or horizontally where we bind the columns of multiple data frames into a wider data frame.
Pivoting: Converting a table or a data frame between long and wide forms. In pivoting, we often move information from column names to columns and vice versa.
Transposing: Converting the rows of a data frame into its columns and vice versa.
Nesting where we cover how to create a data structure where data frames are nested as cells in data frames as well as unnesting nested data frames into a flat data frame structure.