Skip to content

pandas.io.formats.style.Styler.map is missing #1226

Closed
@Molkree

Description

@Molkree

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

No one assigned

    Labels

    Stylerconditional formatting using DataFrame.stylegood first issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions