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

update/insert columns -> assign #269

Merged
merged 3 commits into from
Sep 28, 2023

Conversation

MarcoGorelli
Copy link
Contributor

closes #235

I think I made a mistake in splitting "set_column" into "insert_column" and "update_column":

  1. first, because having tried using the Standard to write code a while now, it's really tedious to have to distinguish them
  2. because I don't think any existing dataframe library has this distinction
  3. a users has brought this up too (set_column_by_name/ set_column? #235)

In keeping with the goal of making the standard feel familiar, let's look at what existing dataframe libraries do:

  • pandas and its clones: either __setitem__ (which the consortium doesn't want) or DataFrame.assign
  • pyspark / polars: DataFrame.with_columns
  • ibis: DataFrame.mutate
  • datatable: update / extend

I don't really mind which one we go with. I'm suggesting with_columns here as I think it's probably the most explicit

@MarcoGorelli MarcoGorelli changed the title update/insert columns -> with_columns update/insert columns -> assign Sep 28, 2023
@MarcoGorelli
Copy link
Contributor Author

approved in today's call (but consensus on assign instead of with_columns)

@MarcoGorelli MarcoGorelli merged commit 5099086 into data-apis:main Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

set_column_by_name/ set_column?
1 participant