Skip to content

Pandas 2.2: Index.format is deprecated #10180

@hcho3

Description

@hcho3

This line

feature_names = data.columns.format()

produces the following warning with Pandas 2.2:

xgboost/data.py:942: FutureWarning: Index.format is deprecated and will be removed in a future version.
Convert using index.astype(str) or index.map(formatter) instead.

The deprecation was introduced in pandas-dev/pandas#55439

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions