Session Ready
Exercise

Separate features and target variable

Now that you have split the data intro training and testing, it's time to perform he final step before fitting the model which is to separate the features and target variables into different datasets. You will use the list of columns names that have been loaded for you.

The main dataset is loaded as telcom, and split into training and testing datasets which are loaded as pandas DataFrames into train and test respectively. The target and custid lists contain the names of the target variable and the customer ID respectively. You will have to create the cols list with the names of the remaining columns. Feel free to explore the datasets in the console.

Instructions
100 XP
  • Store the column names of telcom in a list excluding the target variable and customer ID names.
  • Extract the training features and target.
  • Extract the testing features and target.