Public type stubs for pandas

281 stars 147 forks 281 watchers Python BSD 3-Clause "New" or "Revised" License
4 Open Issues Need Help Last updated: Aug 29, 2025

Open Issues Need Help

View All on GitHub

AI Summary: The `Index.searchsorted` method in pandas has an incorrect type annotation in its stubs. While the stubs declare its return type as `int | list[int]`, at runtime it returns a `numpy.ndarray` when given an array-like input, leading to type checker mismatches.

Complexity: 1/5
good first issue Algos Index

Public type stubs for pandas

Python
good first issue Constructors DataFrame

Public type stubs for pandas

Python

AI Summary: The task is to fix the type stubs for `pandas.MultiIndex.from_product` to correctly accept `range` objects as input. This involves modifying the type hints within the pandas-stubs project to allow `range` objects as valid inputs for the `iterables` parameter, ensuring that type checkers like mypy don't flag them as errors.

Complexity: 3/5
good first issue MultiIndex

Public type stubs for pandas

Python

AI Summary: The task is to investigate and fix a type error in the pandas-stubs project related to the `Series.unstack` method. The error occurs when providing a list of ints or strings as the `level` argument. The issue involves correcting the type annotation for `unstack` to accept lists of levels, similar to the `stack` method, ensuring compatibility with various input types. This likely requires examining the pandas source code and the existing type stubs, understanding the intended behavior of `unstack`, and writing a correct type hint that reflects this behavior.

Complexity: 4/5
good first issue Reshaping

Public type stubs for pandas

Python