Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

DOC: Expand on different Getitem uses#60806

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

Merged
mroeschke merged 3 commits intopandas-dev:mainfromafeld:dot-notation
May 21, 2025

Conversation

afeld
Copy link
Member

This is confusing to my students, so figured it would be helpful to call it out explicitly.

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Testsadded and passed if fixing a bug or adding a new feature
  • Allcode checks passed.
  • Addedtype annotations to new arguments/methods/functions.
  • Added an entry in the latestdoc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.


.. ipython:: python

df["A"]

If the label only contains letters, numbers, and underscores, you can
alternatively use dot notation:
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Is "dot notation" the right term?

Copy link
Member

Choose a reason for hiding this comment

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

Get attribute (getattr) notation would be more correct


.. ipython:: python

df["A"]

If the label only contains letters, numbers, and underscores, you can
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Mind confirming I have this right?

Copy link
Member

Choose a reason for hiding this comment

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

pandas allows strings that passisidentifierhttps://docs.python.org/3/library/stdtypes.html#str.isidentifier

@github-actionsGitHub Actions
Copy link
Contributor

This pull request is stale because it has been open for thirty days with no activity. Pleaseupdate and respond to this comment if you're still interested in working on this.

@afeld
Copy link
MemberAuthor

I'll pick this back up soon.

@datapythonistadatapythonista changed the titleexpand on different Getitem usesDOC: Expand on different Getitem usesMay 21, 2025
@mroeschkemroeschke merged commit1321954 intopandas-dev:mainMay 21, 2025
8 checks passed
@mroeschkemroeschke added this to the3.0 milestoneMay 21, 2025
@mroeschke
Copy link
Member

Thanks@afeld and@datapythonista

afeld reacted with thumbs up emoji

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

@datapythonistadatapythonistadatapythonista approved these changes

@mroeschkemroeschkemroeschke approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
3.0
Development

Successfully merging this pull request may close these issues.

3 participants
@afeld@mroeschke@datapythonista

[8]ページ先頭

©2009-2025 Movatter.jp