def pre_process(dd, df, dataset_len, batch_size):
    """Partition one dataframe to multiple small dataframes based on a given batch size."""
    df = dd.str2ascii(df, dataset_len)
    prev_chunk_offset = 0
    partitioned_dfs = []
    while prev_chunk_offset < dataset_len:
        curr_chunk_offset = prev_chunk_offset + batch_size
        chunk = df.iloc[prev_chunk_offset:curr_chunk_offset:1]
        partitioned_dfs.append(chunk)
        prev_chunk_offset = curr_chunk_offset
    return partitioned_dfs