The previous recipe walked through a trivial example of two small Series being added together with unequal indexes. This problem can produce comically incorrect results when dealing with larger data.
Exploding indexes
Getting ready
In this recipe, we add two larger Series that have indexes with only a few unique values but in different orders. The result will explode the number of values in the indexes.
How to do it...
- Read in the employee data and set the index equal to the race column:
>>> employee = pd.read_csv('data/employee.csv', index_col=&apos...