10000 Add dataframe.join (#238) · data-apis/dataframe-api@046449d · GitHub
[go: up one dir, main page]

Skip to content

Commit 046449d

Browse files
authored
Add dataframe.join (#238)
* add dataframe.join * remove on
1 parent 97d4dfc commit 046449d

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

spec/API_specification/dataframe_api/dataframe_object.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,3 +911,35 @@ def to_array_object(self, dtype: Any) -> Any:
911911
understanding that consuming libraries would then use the
912912
``array-api-compat`` package to convert it to a Standard-compliant array.
913913
"""
914+
915+
def join(
916+
self,
917+
other: DataFrame,
918+
*,
919+
how: Literal['left', 'inner', 'outer'],
920+
left_on: str | list[str],
921+
right_on: str | list[str],
922+
) -> DataFrame:
923+
"""
924+
Join with other dataframe.
925+
926+
Parameters
927+
----------
928+
other : DataFrame
929+
Dataframe to join with.
930+
how : str
931+
Kind of join to perform.
932+
Must be one of {'left', 'inner', 'outer'}.
933+
left_on : str | list[str]
934+
Key(s) from `self` to perform `join` on.
935+
If more than one key is given, it must be
936+
the same length as `right_on`.
937+
right_on : str | list[str]
938+
Key(s) from `other` to perform `join` on.
939+
If more than one key is given, it must be
940+
the same length as `left_on`.
941+
942+
Returns
943+
-------
944+
DataFrame
945+
"""

0 commit comments

Comments
 (0)
0