-
Notifications
You must be signed in to change notification settings - Fork 21
add concat #137
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 concat #137
Changes from 1 commit
46eb08e
fa16046
e9ef937
2e941cc
d323908
1caf2e4
ce68605
eed4ef4
0277fcc
2827cd6
71bb209
dbbad7e
3ba1a4b
b7cedb7
869f858
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -214,6 +214,22 @@ def get_column_names(self) -> Sequence[str]: | |
""" | ||
... | ||
|
||
def concat(self, other: Sequence[DataFrame]) -> DataFrame: | ||
""" | ||
Concatenate current and other DataFrames vertically. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about mentioning that column names must match? And must ordering match too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We may want to document any row ordering guarantees or lack thereof as well. I.E. does this guarantee that for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I presume so - or should that not be guaranteed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe ANSI SQL doesn't guarantee any ordering of In general though, the often desired behavior is to maintain the order based on the passed in objects. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i wasn't aware - ok thanks have added a note There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I.E. Ibis (https://github.com/ibis-project/ibis) backed by basically any of its backends (https://github.com/ibis-project/ibis#backends) where the DataFrame(s) in question are the result of running joins. There's no guarantees made in output ordering for the joins as well as no guarantees made in output ordering for the concatenation. It could potentially be worked around by doing something like using SQL There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need resolution here before we can merge. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we've got I don't know what the resolution is here, this discussion's a bit abstract for me - what do you suggest? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Potentially a random row or set of rows with no guarantee about determinism. Maybe we can be a bit looser in the language and leave it how it currently is which is a bit underdefined which basically makes it implementation defined? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok - anything you'd like changed, or ok to merge? |
||
|
||
To concatenate horizontally, please use ``insert``. | ||
|
||
Parameters | ||
---------- | ||
other : Sequence[DataFrame] | ||
DataFrames to concatenate with. | ||
|
||
Returns | ||
------- | ||
DataFrame | ||
""" | ||
|
||
def __eq__(self, other: DataFrame | Scalar) -> DataFrame: | ||
""" | ||
Compare for equality. | ||
|
Uh oh!
There was an error while loading. Please reload this page.