Skip to content

fix(doc): #61432 typing #61455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cmp0xff
Copy link

@cmp0xff cmp0xff commented May 19, 2025

@cmp0xff cmp0xff marked this pull request as ready for review May 19, 2025 07:49
Column to use to make new frame's columns.
index : str or object or a list of str, optional
index : label or object or a list of the previous, optional
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rhshadrach IMO we should actually be using Hashable everywhere as since it's an actual Python type unlike label. What do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be good with that. The only potential reason I can cook up not to is that the public API does have a number of arguments named label or derivatives thereof. But I agree that this should be a type rather than a description of use.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am just fixing label in the context of the current MR in ccf060c . For further labels, I would rather have them fixed separatly.

@mroeschke mroeschke added the Docs label May 19, 2025
Keys to group by on the pivot table index. If a list is passed,
it can contain any of the other types (except list). If an array is
passed, it must be the same length as the data and will be used in
the same manner as column values.
columns : column, Grouper, array, or list of the previous
columns : column, Grouper, array, or sequence of the previous
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is tuple treated the same as other sequences here? (I haven't checked)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for observing the potential danger. index and columns are processed by

    index = _convert_by(index)
    columns = _convert_by(columns)

which converts by using by = list(by).

@mroeschke mroeschke added this to the 3.0 milestone May 20, 2025
Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cmp0xff
Copy link
Author

cmp0xff commented May 20, 2025

@mroeschke thank you for the approval. Wouldn't the PR fit for 2.2.4 or 2.3.0? It seems to be merely a fix to me.

@mroeschke
Copy link
Member

This PR will go into 3.0. No whatsnew entry is needed for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: Series.name is just Hashable, but many column arguments require str
3 participants