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

add a kwarg to reuse the input column names in cols => fun in select/transform/combine #2396

Closed
bkamins opened this issue Aug 30, 2020 · 5 comments · Fixed by #2397
Closed
Labels
feature non-breaking The proposed change is not breaking
Milestone

Comments

@bkamins
Copy link
Member

bkamins commented Aug 30, 2020

This request is showing often as sometimes adding transformation function name is not desired.
A working idea is to add a suffix kwarg that would handle this (actually the suffix might be more flexible than just true/false, but a general suffix - I will propose something).

I will make a PR for this. This is an issue to keep track that this happens.

@bkamins bkamins added feature non-breaking The proposed change is not breaking labels Aug 30, 2020
@bkamins bkamins added this to the 1.0 milestone Aug 30, 2020
@bkamins
Copy link
Member Author

bkamins commented Aug 30, 2020

@nalimilan - the only problematic case to decide what to do is [] => fun. What should be the column name then when we drop adding function as a suffix? It can be Symbol(""), as we allow it, but it seems to be obscure. However, maybe it is OK, as one has to be explicit to get this outcome.

@nalimilan
Copy link
Member

nalimilan commented Aug 30, 2020

I'd say Bool is OK for a start, even if later we might want to allow passing any function. For [] => fun let's just throw an error?

Though for consistency with join (#2313) shouldn't the argument be called rename?

EDIT: BTW, we have a renamecols argument in unstack that looks like it should also use the same name for consistency.

@bkamins
Copy link
Member Author

bkamins commented Aug 30, 2020

Now I see this comment. So maybe in joins I also change it to renamecols to have the same kwarg name everywhere?

For [] => fun let's just throw an error?

OK

@nalimilan
Copy link
Member

Yeah if you want to avoid breaking unstack then better use renamecols and change join to use that before a release includes it.

@bkamins
Copy link
Member Author

bkamins commented Aug 30, 2020

This is what I will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature non-breaking The proposed change is not breaking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants