def k_fold_split(dataset, k, seed):
    """ split dataset into k folds """
    if k == 1:
        return [dataset]
    else:
        one_fold, other = dataset.split(1 / k, random_state=seed)
        results = k_fold_split(other, k - 1, seed)
        results.append(one_fold)
        return results