Session Ready
Exercise

Split data to training and testing

Final step before we move to building the regression model! Here, you will follow the steps of identifying the names of the target variable and the feature columns, extract the data, and split them into training and testing.

The pandas and numpy libraries have been loaded as pd as np respectively. The input features are imported as the features dataset, and the target variable you built in the previous exercise has been imported for you as Y.

Instructions
100 XP
  • Store the customer identifier column name as a list.
  • Select the feature column names excluding the customer identifier.
  • Extract the features as X.
  • Split the data to training and testing by using the train_test_split() function.