question archive How to Code a function that takes the whole data set as an input and returns a binary target variable that we should predict to address the problem discussed in the case study
Subject:Computer SciencePrice: Bought3
How to Code a function that takes the whole data set as an input and returns a binary target variable that we should predict to address the problem discussed in the case study.
coding:
def get_target_variable(data):
# YOUR CODE HERE
raise NotImplementedError()
The output of your function should be a pandas Series where values are either True or False. A True value should represent the outcome of interest (e.g., the customer is angry). Check that your function is giving the correct type of output: