Skip to content

Conversation

G26karthik
Copy link
Contributor

@G26karthik G26karthik commented Oct 6, 2025

xref #62437

Description

This PR replaces the @Appender decorator with an inline docstring for the DataFrame.items() method as part of the effort to remove dynamic docstring generation in pandas.

Changes Made

  • Removed @Appender(_shared_docs["items"]) decorator from DataFrame.items() in pandas/core/frame.py
  • Inlined the complete docstring directly into the method definition
  • No functional changes - only documentation improvement

Why This Change?

As described in #62437, removing these decorators:

  1. Reduces indirection and improves code clarity for new contributors
  2. Allows docstring standardization rules from Ruff to apply
  3. Makes docstrings more maintainable

Testing

  • Verified pandas imports successfully
  • Confirmed DataFrame.items() functionality works correctly
  • Checked docstring renders properly using DataFrame.items.__doc__

cc @mroeschke

- Removed @appender decorator from DataFrame.items() method
- Inlined the complete docstring directly into the method
- Addresses issue pandas-dev#62437 to improve docstring clarity and standardization
@mroeschke mroeschke added the Docs label Oct 6, 2025
@mroeschke mroeschke added this to the 3.0 milestone Oct 6, 2025
@mroeschke mroeschke merged commit 7b82470 into pandas-dev:main Oct 6, 2025
47 checks passed
@mroeschke
Copy link
Member

Thanks @G26karthik

jzwick pushed a commit to jzwick/pandas that referenced this pull request Oct 8, 2025
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.

2 participants