Skip to content

Conversation

@frankier
Copy link

@frankier frankier commented Dec 5, 2025

This is needed since it is a dynamically created NamedTuple. An overload is added for the case of a plain tuple return value when name is passed as None.

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.
  • If I used AI to develop this pull request, I prompted it to follow AGENTS.md.

This is needed since it is a dynamically created NamedTuple. An overload
is added for the case of a plain tuple return value when name is passed as None.
Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! CI is currently failing on type-checking.

- Added a new :meth:`DataFrame.from_arrow` method to import any Arrow-compatible
tabular data object into a pandas :class:`DataFrame` through the
`Arrow PyCapsule Protocol <https://arrow.apache.org/docs/format/CDataInterface/PyCapsuleInterface.html>`__ (:issue:`59631`)
- :meth:`DataFrame.itertuples` is now annotated to return an iterable of Any to accommodate dynamic namedtuple types
Copy link
Member

Choose a reason for hiding this comment

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

pandas publishes type-hints through pandas-stubs, the ones in the pandas library itself do not impact users. As this is not a user-facing change, the whatsnew note should be removed.

@rhshadrach rhshadrach added the Typing type annotations, mypy/pyright type checking label Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Typing type annotations, mypy/pyright type checking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants