Skip to content

API break with DataFrame.rename #17963

Closed
@TomAugspurger

Description

@TomAugspurger

Posted in #17800 (comment), but making a new issue to make sure it's not lost and that everone is aware, and to check if we're comfortable with this:

df = pd.DataFrame(columns=['A', 'B'])
df.rename(None, str.lower)

In previous versions that meant .rename(index=None, columns=str.lower), but now it's .rename(mapper=None, index=str.lower). I think this is fundamentally ambiguous correct? This is breaking dask, which used positional arguments, but I suspect it'll break more code.

cc @jreback @jorisvandenbossche

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions