Skip to content

Add "inplace" parameter to TriangleBase.rename #662

@genedan

Description

@genedan

Description

While working on #660, I found that TriangleBase.rename defaults to inplace replacement, whereas the corresponding DataFrame.rename method defaults to returning a copy. I propose adding an inplace parameter that defaults to False to match the behavior of pandas.

This feature will introduce breaking changes since any code expecting inplace replacement will now need to explicitly specify it with an argument.

Is your feature request aligned with the scope of the package?

  • Yes, absolutely!
  • No, but it's still worth discussing.
  • N/A (this request is not a codebase enhancement).

Describe the solution you'd like, or your current workaround.

The default behavior will now be:

triangle.rename(axis='columns', value=['foo'], inplace=False)

In order to do inplace replacement, it will now have to be specified explicitly:

triangle.rename(axis='columns', value=['foo'], inplace=True)

Do you have any additional supporting notes?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Effort > Moderate 🐕Mid-sized tasks estimated to take a few days to a few weeks.Impact > Significant 💠High impact changes. Should only be done in response with community inputs.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions