Skip to content

CSV.Chunks API #1049

Closed
Closed

Description

@bkamins

From the docstring of CSV.Chunks it seems that ntasks is used to specify number of chunks.
The issue is that this name is strange. ntasks should be rather used to specify number of tasks allocated for reading data. Some other kwarg, e.g. nchunks should be used to specify number of chunks I think.

Additionally documentation could say something about how the size of the chunk is determined. It seems that this is not an equal split, but some other rule (most likely dynamic and approximate).

Activity

  1. quinnj commented on Oct 15, 2026

    @quinnj
    Member

    [comment generated via AI] Addressed in CSV 1.1.0 (#1204): ntasks bounds the tasks that parse one batch and does not set the batch count. chunkbytes sets the batch size, a byte window that ends at a row boundary (64 MiB by default), and the CSV.Chunks docstring describes both. Checked on main: ntasks=1, 4, and 16 give the same 3 batches for a 10.8 MB input with chunkbytes=4 MiB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions