October 2019
Beginner to intermediate
674 pages
16h 43m
English
Apart from selecting the useful features, we also need to extract significant variables from the existing ones. This method is called feature extraction. In the current example, a new feature called new_tenure has been extracted from the existing variables. This variable gives us the amount of time that a customer has stayed with the firm:
data['new_tenure']=data['active_status']*data['days_old']+(1-data['active_status'])*data['days_active_tenure']
The following DataFrame shows the newly extracted variables:

Read now
Unlock full access