def trainTestSplit(df):
    """
    Split the data set into a train and a test set.
    
    The last 7 days are used for testing. Returns two pandas data frames, input should usually be the output of `loadDataset`.
    """
    maxDay = df["date"].max()
    train = df[df["date"] <= maxDay - 7]
    test = df[df["date"] > maxDay - 7]
    return train, test