Employee comparison

Now we will compare the employees with Low and Very High JobSatisfaction levels. We will compare these two groups across the following variables: Age, Department, and DistanceFromHome. To make this comparison, we will use a grouping operation. Grouping operations are those operations where we apply a sequence of actions. These actions are called split, apply, and combine. We will see how this works in the following steps:

  1. The first step in this operation is the Split step, where we split our DataFrame into a group of DataFrames based on some criteria or some categorical variable. This will produce a grouped object that has a structure similar to a dictionary, and every group is associated with a different key.
  2. The second ...

Get Become a Python Data Analyst now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.