Skip to content

Commit 038976e

Browse files
authored
DOC: Add clarification to groupby docs regarding hashes and equality (#57648)
1 parent 812a996 commit 038976e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/core/shared_docs.py

+6
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,12 @@
178178
<https://pandas.pydata.org/pandas-docs/stable/groupby.html>`__ for more
179179
detailed usage and examples, including splitting an object into groups,
180180
iterating through groups, selecting a group, aggregation, and more.
181+
182+
The implementation of groupby is hash-based, meaning in particular that
183+
objects that compare as equal will be considered to be in the same group.
184+
An exception to this is that pandas has special handling of NA values:
185+
any NA values will be collapsed to a single group, regardless of how
186+
they compare. See the user guide linked above for more details.
181187
"""
182188

183189
_shared_docs["melt"] = """

0 commit comments

Comments
 (0)