polars icon indicating copy to clipboard operation
polars copied to clipboard

feat(python): allow df.rename and lf.rename to take a renaming function

Open Wainberg opened this issue 1 year ago • 1 comments

Closes https://github.com/pola-rs/polars/issues/13229.

There seemed to be a lot of popular demand for this (based on the number of likes on the original issue), so I went ahead and implemented it.

Wainberg avatar Jan 13 '24 23:01 Wainberg

@alexander-beedie just added a couple of tests. Did you mean to leave comments on the code as well?

Wainberg avatar Jan 14 '24 20:01 Wainberg

@alexander-beedie how's this looking, would you say it's ready to merge?

Wainberg avatar Jan 19 '24 06:01 Wainberg

@alexander-beedie how's this looking, would you say it's ready to merge?

I don't see that you've addressed the inline comments yet? Once they're handled, then "yes" ;)

alexander-beedie avatar Jan 19 '24 11:01 alexander-beedie

@alexander-beedie you'll have to forgive me if I'm being thick, but I don't see any comments. Usually they'd appear in the conversation tab, but here's what the conversation tab looks like for me:

image

and here's the files changed tab:

image

Wainberg avatar Jan 19 '24 16:01 Wainberg

@Wainberg I don't think you're being thick, I can't see them either.

@alexander-beedie Could you re-post those comments?

orlp avatar Jan 19 '24 16:01 orlp

@alexander-beedie Could you re-post those comments?

Ouch; I blame the GitHub UI for that one; I could see them marked as "Pending", which I thought was "pending action by the author of the PR", but apparently means "Pending you hitting the 'submit' button so the author can see them", sigh... Apologies for that one @Wainberg; think they should be visible now 🤣

alexander-beedie avatar Jan 19 '24 16:01 alexander-beedie

@alexander-beedie No worries! Just made the two changes you suggested.

Wainberg avatar Jan 19 '24 16:01 Wainberg

Looks good to me 👌

alexander-beedie avatar Jan 19 '24 17:01 alexander-beedie