Skip to content

Add informal definition of "label" in note #27005

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

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions doc/source/user_guide/indexing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
Indexing and Selecting Data
***************************

The axis labeling information in pandas objects serves many purposes:
In pandas, data structure axes such as the rows and columns of a DataFrame may have
Copy link
Member

Choose a reason for hiding this comment

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

To be clear, an Index (which is used for selection along an axis) does have labels. This is a main thing that separates pandas from libraries like NumPy

Copy link
Author

@sgpinkus sgpinkus Jun 30, 2019

Choose a reason for hiding this comment

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

Yes I know. It's actually quite challenging to unpack axis, index, labels, positional indexation via integers in a sentence or two. An index really is labels. I found it an improvement over "axis labeling information ... serves many purposes", by being less nebulous and vague.

labels associated with them. Axis labeling in pandas is primarily used to:

* Identifies data (i.e. provides *metadata*) using known indicators,
* Identify data (i.e. provide *metadata*) using known indicators,
important for analysis, visualization, and interactive console display.
* Enables automatic and explicit data alignment.
* Allows intuitive getting and setting of subsets of the data set.
* Enable automatic and explicit data alignment.
* Allow intuitive getting and setting of subsets of the data set.

In this section, we will focus on the final point: namely, how to slice, dice,
and generally get and set subsets of pandas objects. The primary focus will be
on Series and DataFrame as they have received more development attention in
this area.
this area.

.. note::

Expand Down