-
-
Notifications
You must be signed in to change notification settings - Fork 145
Closed
Labels
Stylerconditional formatting using DataFrame.styleconditional formatting using DataFrame.stylegood first issue
Description
Describe the bug
pandas.io.formats.style.Styler.map
method is missing from the stub
To Reproduce
import pandas as pd
df = pd.DataFrame(data={"col1": [1, -2], "col2": [-3, 4]})
df.style.map(lambda v: "color: red;" if v < 0 else None)
Last line raises type checker errors. mypy: error: "Styler" has no attribute "map" [attr-defined]
, pylance: Cannot access attribute "map" for class "Styler"
Please complete the following information:
- OS: WSL
- OS Version [e.g. 22]: Ubuntu 2024
- python version: 3.13
- version of type checker: mypy 1.15.0/pylance 2025.5.1 with pyright 1.1.400
- version of installed
pandas-stubs
: 2.2.3.250308 but the issue is present on the latest 93a9e11
Metadata
Metadata
Assignees
Labels
Stylerconditional formatting using DataFrame.styleconditional formatting using DataFrame.stylegood first issue