-
Notifications
You must be signed in to change notification settings - Fork 21
API: DataFrame.assign #86
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
Comments
I had to refresh my memory on that one - that was discussed in gh-10, and the arguments still seem convincing.
Isn't that again a "sure that's allowed in an implementation, the standard only deals with unique strings, but doesn't forbid going beyond that"?
|
I was specifically referring to the signature
I'm not sure how settled the existence of a |
Okay, got it. def assign(self, key: str, value: column): The |
Isn't the pandas implementation (slightly) more complicated than that because |
I guess. I don't think there's any interest in supporting that for the DataFrame API here. |
Summarizing the discussion from the call 2022-09-29, the agreed-upon API looks like:
There was discussion of plural analogues |
Are the discussion notes meant to be private? I'd like to follow along with what's being decided here... |
@mwaskom good question. Those notes are more a literal transcript than regular meeting notes; those transcripts and the video recordings are meant to be private. The alternative is more "don't make them" rather than publishing them - I think of these sort of like hallway conversations or BoFs at conferences, recording such events would change the dynamics a lot. However, it should definitely be possible to follow along and participate. Anything discussed should be summarized with the key rationales for proposed decisions, so that we both have a public record and give everyone a change to jump in and provide arguments for going a different route. And we should avoid linking to private notes, just like in any other open source project. In this case it looks like there were no major conceptual issues here. A summary of the most important points made:
|
closing as there's now dataframe.assign |
The pandas implementation is very simple:
We can't just re-use this directly bc we don't have
__setitem__
. Also, ifassign
is the main setitem-like method, it'd be nice to retain the option of supporting non-string keys. So maybe something likedef assign(self, key: Hashable, value: ??) -> DataFrame: ...
? If we have aColumn
object, could use that forvalue
?The text was updated successfully, but these errors were encountered: