Skip to content

DataFrame - Rename columns #6496

Closed as not planned
Closed as not planned

Description

@luisquintanilla
  • Rename in place
  • Rename multiple columns

Activity

  1. ghost added
    untriagedNew issue has not been triaged
    on Dec 1, 2022
  2. changed the title [-]Rename columns[/-] [+]DataFrame - Rename columns[/+] on Dec 1, 2022
  3. QuantumHope commented on Oct 25, 2023

    @QuantumHope

    This would be very helpful from the perspective of Polyglot Notebooks and trying to do the same types of things you can do in Pandas, but with DataFrame. Right now it's not intuitive how you rename an existing column in a DataFrame.

    Update: I went through the code and did find the DataFrameColumn.SetName method. It wasn't showing up for me in Polyglot Notebooks intellisense, but it's present and it works.

    That said, a more intuitive way of doing this would be with syntax like df["X1"].Name = "Credit Amount"; or df["X1"].Rename("Credit Amount"); or df.Rename("X1", "Credit Amount"); or possibly a df.Rename that takes in a Dictionary<string, string> for bulk renaming like Pandas rename does. Even making the Name property have a public setter would help.

  4. rosebyte commented on Sep 29, 2026

    @rosebyte
    Member

    Triage: We think the SetName does the job well. It's a pity Polyglot Notebooks doesn't see the method, but it might be fixed rather there.

  5. locked and limited conversation to collaborators on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-DataFrameMicrosoft.Data.Analysis DataFrame APIsyellowmaintenance only

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions