File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -6305,6 +6305,39 @@ def conditional_join(
6305
6305
6306
6306
Only `inner`, `left`, and `right` joins are supported.
6307
6307
6308
+ Functional usage syntax:
6309
+
6310
+ .. code-block:: python
6311
+
6312
+ import pandas as pd
6313
+ import janitor as jn
6314
+
6315
+ df = pd.DataFrame(...)
6316
+ right = pd.DataFrame(...)
6317
+
6318
+ df = jn.conditional_join(
6319
+ df,
6320
+ right,
6321
+ (col_from_df, col_from_right, join_operator),
6322
+ (col_from_df, col_from_right, join_operator),
6323
+ ...,
6324
+ how = 'inner' # or left/right
6325
+ sort_by_appearance = True # or False
6326
+ )
6327
+
6328
+ Method chaining syntax:
6329
+
6330
+ .. code-block:: python
6331
+
6332
+ df.conditional_join(
6333
+ right,
6334
+ (col_from_df, col_from_right, join_operator),
6335
+ (col_from_df, col_from_right, join_operator),
6336
+ ...,
6337
+ how = 'inner' # or left/right
6338
+ sort_by_appearance = True # or False
6339
+ )
6340
+
6308
6341
6309
6342
:param df: A Pandas DataFrame.
6310
6343
:param right: Named Series or DataFrame to join to.
You can’t perform that action at this time.
0 commit comments