October 2017
Intermediate to advanced
532 pages
16h 10m
English
Step 2 appears at first to create two unique objects but in fact, it creates a single object that is referred to by two different variable names. The expression employee['BASE_SALARY'], technically creates a view, and not a brand new copy. This is verified with the is operator.
To ensure that both variables reference completely different objects, we use the copy Series method and again verify that they are different objects with the is operator. Step 4 uses the sort_index method to sort the Series by race. Step 5 adds these different Series together to produce ...
Read now
Unlock full access