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

Overload makeunique to allow true/false, certain keywords (:update, :… #3373

Closed
wants to merge 1 commit into from

Conversation

leei
Copy link

@leei leei commented Aug 24, 2023

An alternative to #3366 which added a dupcol keyword.

This one doesn't deprecate makeunique but overloads it instead with three kinds of values allowed:

  1. true/false for make a new column or raise an error (current behaviour),
  2. a Function of two parameters that determines how to combine duplicate column values into one, or
  3. one of a set of keywords that handle some of 1 and 2

The currently allowed keywords are:

  • :makeunique – create a new uniquely named column
  • :error – raise an Error
  • :update – update the left-hand column with non-missing values from the right
  • :ignore – ignore the duplicated column

The implementation is simpler than #3366 and is more flexible. It doesn't address the desire to have a function that would determine how makeunique=true would generate new column names, but that could be accomplished by adding a new keyword argument.

…ignore) and a combine function to combine columns.
@bkamins
Copy link
Member

bkamins commented Sep 25, 2023

Closing, as #3366 will be followed. Right?

@bkamins bkamins closed this Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants