pandas-stubs icon indicating copy to clipboard operation
pandas-stubs copied to clipboard

Public type stubs for pandas

Results 88 pandas-stubs issues
Sort by recently updated
recently updated
newest added

```python import pandas as pd df = pd.DataFrame({"a":[1,2,3],"b":[0.0,1,1]}) df.columns= ["c", "d"] # mypy error, columns is `Index` so cannot take List[str} ```

mypy bug

Hi, I am having problems understanding what I am seeing here in the below example. Why can't mypy figure out that after the else statement, we definitely have a DataFrame?...

mypy bug

**Describe the bug** A clear and concise description of what the bug is. **To Reproduce** 1. Provide a minimal runnable `pandas` example that is not properly checked by the stubs....

Apply
Regression

All of these groupby operations take a function that can be a `str` or a `Callable`. They should ensure that: - The `Callable` accepts a first parameter that is a...

Hi there! I'm the developer/maintainer of [`nptyping`](https://github.com/ramonhagenaars/nptyping), a little library for type hinting around numpy (and pandas DataFrame soon). What I'm working on, is to allow a type hint for...

There are some inconsistencies in types in `pandas._typing.py` and `pandas-stubs._typing.pyi` . These should be reconciled. In addition, types that are only in the stubs should probably be private with a...

The public API is defined based on this page https://pandas.pydata.org/docs/reference/index.html Since there are many classes/functions that should be public but are not listed there it becomes a bit ambiguous what...

- [X] Closes #965 - [X] Tests added: Please use `assert_type()` to assert the type of any return value

**Describe the bug** A clear and concise description of what the bug is. **To Reproduce** ```python s = pd.Series(["a", "b", "a"], index=[1, 2, 2]) s.groupby(level=0).count() ``` Type checker: pyright (in...

good first issue
Groupby