def split_data(test_size, df):
    """
    Split data into training and testing sets

    INPUT:
    test_size - size of testing data in ratio (default = 0.2)
    df - cleaned and processed dataframe

    OUTPUT:
    train - training data set
    test - testing data set
    """
    test_size = test_size
    training_size = 1 - test_size

    test_num = int(test_size * len(df))
    train_num = int(training_size * len(df))

    train = df[:train_num][['Date', 'Close']]
    test = df[train_num:][['Date', 'Close']]

    return train, test