Skip to content

Commit 0277fcc

Browse files
author
MarcoGorelli
committed
move concat to __init__
1 parent eed4ef4 commit 0277fcc

File tree

2 files changed

+24
-23
lines changed

2 files changed

+24
-23
lines changed

spec/API_specification/dataframe_api/__init__.py

+24
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Function stubs and API documentation for the DataFrame API standard.
33
"""
4+
from typing import Sequence
45

56
from .column_object import *
67
from .dataframe_object import *
@@ -12,3 +13,26 @@
1213
String representing the version of the DataFrame API specification to which the
1314
conforming implementation adheres.
1415
"""
16+
17+
def concat(dataframes: Sequence[DataFrame]) -> DataFrame:
18+
"""
19+
Concatenate DataFrames vertically.
20+
21+
To concatenate horizontally, please use ``insert``.
22+
23+
Parameters
24+
----------
25+
dataframes : Sequence[DataFrame]
26+
DataFrames to concatenate.
27+
Column names, ordering, and dtypes must match.
28+
29+
Notes
30+
-----
31+
The order in which the input DataFrames appear in
32+
the output is preserved.
33+
34+
Returns
35+
-------
36+
DataFrame
37+
"""
38+
...

spec/API_specification/dataframe_api/dataframe_object.py

-23
Original file line numberDiff line numberDiff line change
@@ -241,29 +241,6 @@ def get_column_names(self) -> Sequence[str]:
241241
"""
242242
...
243243

244-
def concat(self, other: Sequence[DataFrame]) -> DataFrame:
245-
"""
246-
Concatenate current and other DataFrames vertically.
247-
248-
To concatenate horizontally, please use ``insert``.
249-
250-
Parameters
251-
----------
252-
other : Sequence[DataFrame]
253-
DataFrames to concatenate with.
254-
Column names, ordering, and dtypes must match.
255-
256-
Notes
257-
-----
258-
The order in which the input DataFrames appear in
259-
the output is preserved.
260-
261-
Returns
262-
-------
263-
DataFrame
264-
"""
265-
...
266-
267244
def sorted_indices(
268245
self,
269246
keys: Sequence[str],

0 commit comments

Comments
 (0)