Skip to content

Improve documentation of DataFrame.divisions #8264

Closed

Description

@gjoseph92

Talking to a user recently, they were confused about how to pass divisions= in set_index. Specifically, they missed that the list had to have N+1 elements in it, and the N+1th element was the upper bound for the last partition.

The API docs currently link to https://docs.dask.org/en/latest/dataframe-design.html#partitions, which does describe this in words, but takes some close reading to get.

A simple example of setting divisions using a list of values, both in the set_index docs and in the dataframe design section, might be helpful.

Activity

  1. added
    documentation
    on Oct 14, 2021
  2. added
    good first issue
    on Oct 26, 2021
  3. ncclementi commented on Nov 2, 2021

    @ncclementi
    Member

    Related to this issue We were chatting about the divisions section of the docs in set_index where it says

    "If sorted=False, you should leave divisions empty and call repartition after set_index." It looks like this comment was introduced a long time ago by @jcrist (see ad752cc) and we wonder if this is still the case, or the docs are missing an update. Jim, do you remember why this comment was added at the time and if this still holds?

    cc: @gjoseph92

  4. jsignell commented on Nov 15, 2021

    @jsignell
    Member

    I think I understand what the original meaning was. I opened a PR to clarify.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    dataframedocumentationgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions