import logging


def prepare_data(df, target_col="y"):

  """it is used to separate the dependent and independent variables

  Args:
      df (pd.DataFrame): its the pandas dataframe from the dataset
      
  Returns:
      tuple: it returns tuples of dependent and independent variables
  """
  logging.info("Preparing the data by segregating the dependent and independent variables")

  X = df.drop(target_col, axis=1) #axis=1 means that it will drop the y column in this case

  y = df[target_col]

  return X, y