Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork18.5k
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
fix(doc): #61432 typing#61455
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
pandas/core/frame.py Outdated
Column to use to make new frame's columns. | ||
index :str or object or a list ofstr, optional | ||
index :label or object or a list ofthe previous, optional |
There was a problem hiding this comment.
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 usingHashable
everywhere as since it's an actual Python type unlikelabel
. What do you think?
There was a problem hiding this comment.
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 namedlabel
or derivatives thereof. But I agree that this should be a type rather than a description of use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I am just fixinglabel
in the context of the current MR inccf060c . For furtherlabel
s, I would rather have them fixed separatly.
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, orlist of the previous | ||
columns : column, Grouper, array, orsequence of the previous |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
andcolumns
are processed by
index=_convert_by(index)columns=_convert_by(columns)
which converts by usingby = list(by)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM
@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. |
This PR will go into 3.0. No whatsnew entry is needed for this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
lgtm
fe60f43
intopandas-dev:mainUh oh!
There was an error while loading.Please reload this page.
Thanks@cmp0xff |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.