Skip to content

Commit 2aeaf00

Browse files
add concat (data-apis#137)
* draft concat * note about strictness * note ordering * note that order is indeed preservedd * lint * fixup first/last rendering * move concat to __init__ * Update spec/API_specification/dataframe_api/dataframe_object.py * Revert "Update spec/API_specification/dataframe_api/dataframe_object.py" This reverts commit 2827cd6. * Update spec/API_specification/dataframe_api/__init__.py * Update spec/API_specification/dataframe_api/__init__.py Co-authored-by: Keith Kraus <[email protected]> * post-merge fixup --------- Co-authored-by: MarcoGorelli <> Co-authored-by: Keith Kraus <[email protected]>
1 parent 27501f8 commit 2aeaf00

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

spec/API_specification/dataframe_api/__init__.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,26 @@
1818
conforming implementation adheres.
1919
"""
2020

21+
def concat(dataframes: Sequence[DataFrame]) -> DataFrame:
22+
"""
23+
Concatenate DataFrames vertically.
24+
25+
To concatenate horizontally, please use ``insert``.
26+
27+
Parameters
28+
----------
29+
dataframes : Sequence[DataFrame]
30+
DataFrames to concatenate.
31+
Column names, ordering, and dtypes must match.
32+
33+
Notes
34+
-----
35+
The order in which the input DataFrames appear in
36+
the output is preserved (so long as the DataFrame implementation supports row
37+
ordering).
38+
"""
39+
...
40+
2141
def column_from_sequence(sequence: Sequence[object], *, dtype: dtype) -> Column:
2242
"""
2343
Construct Column from sequence of elements.
@@ -52,3 +72,4 @@ def dataframe_from_dict(data: Mapping[str, Column]) -> DataFrame:
5272
-------
5373
DataFrame
5474
"""
75+
...

0 commit comments

Comments
 (0)