Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataFrame - Rename columns #6496

Open
2 tasks
Tracked by #6144
luisquintanilla opened this issue Dec 1, 2022 · 1 comment
Open
2 tasks
Tracked by #6144

DataFrame - Rename columns #6496

luisquintanilla opened this issue Dec 1, 2022 · 1 comment

Comments

@luisquintanilla
Copy link
Contributor

luisquintanilla commented Dec 1, 2022

  • Rename in place
  • Rename multiple columns
@ghost ghost added the untriaged New issue has not been triaged label Dec 1, 2022
@luisquintanilla luisquintanilla changed the title Rename columns DataFrame - Rename columns Dec 1, 2022
@luisquintanilla luisquintanilla removed the untriaged New issue has not been triaged label Dec 1, 2022
@IntegerMan
Copy link

IntegerMan commented Oct 25, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants