From 35ca598b95c5fcad04518cbe5dd0ae7a5c164244 Mon Sep 17 00:00:00 2001 From: MarcoGorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Thu, 7 Sep 2023 09:31:15 +0200 Subject: [PATCH 1/2] note uniqueness constraint on join --- spec/API_specification/dataframe_api/dataframe_object.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/API_specification/dataframe_api/dataframe_object.py b/spec/API_specification/dataframe_api/dataframe_object.py index 0fd0eed8..779e4c48 100644 --- a/spec/API_specification/dataframe_api/dataframe_object.py +++ b/spec/API_specification/dataframe_api/dataframe_object.py @@ -932,6 +932,10 @@ def join( """ Join with other dataframe. + Other than the joining column name(s), no column name is allowed to appear in + both `self` and `other`. Rename columns before calling `join` if necessary + using :meth:`rename_columns`. + Parameters ---------- other : DataFrame From bae1918be14a09b2aafffbdd45af32936a8271e9 Mon Sep 17 00:00:00 2001 From: MarcoGorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Wed, 27 Sep 2023 13:39:19 +0100 Subject: [PATCH 2/2] clarify raises --- spec/API_specification/dataframe_api/dataframe_object.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec/API_specification/dataframe_api/dataframe_object.py b/spec/API_specification/dataframe_api/dataframe_object.py index 779e4c48..bf9643e6 100644 --- a/spec/API_specification/dataframe_api/dataframe_object.py +++ b/spec/API_specification/dataframe_api/dataframe_object.py @@ -955,4 +955,10 @@ def join( Returns ------- DataFrame + + Raises + ------ + ValueError + If, apart from `left_on` and `right_on`, there are any column names + present in both `self` and `other`. """