Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3749,7 +3749,7 @@
"Here, you simply flipped the positions of the input DataFrames and specified a right join. When you inspect `right_merged`, you might notice that it's not exactly the same as `left_merged`. The only difference between the two is the order of the columns: the first input's columns will always be the first in the newly formed DataFrame.\n",
"\n",
"## .join()\n",
"`.join()` uses `merge()` under the hood, but provides a much more simplified interface to `merge()` and by default joins on indexes. Here is an introductory example using the `lsuffix` and `rsuffix` parameters to handle overlapping column names."
"`.join()` uses `merge()` under the hood, but provides a much more simplified interface to `merge()` and by default joins on indexes. Here is an introductory example using the `suffixes` parameter to handle overlapping column names."
]
},
{
Expand Down Expand Up @@ -4637,7 +4637,7 @@
}
],
"source": [
"precip_one_station.join(climate_temp, lsuffix=\"_left\", rsuffix=\"_right\")"
"precip_one_station.join(climate_temp, suffixes=(\"_left\", \"_right\"))"
]
},
{
Expand Down Expand Up @@ -5532,7 +5532,7 @@
}
],
"source": [
"climate_temp.join(precip_one_station, lsuffix=\"_left\", rsuffix=\"_right\")"
"climate_temp.join(precip_one_station, suffixes=(\"_left\", \"_right\"))"
]
},
{
Expand Down Expand Up @@ -6422,8 +6422,7 @@
" climate_precip.set_index([\"STATION\", \"DATE\"]),\n",
" on=[\"STATION\", \"DATE\"],\n",
" how=\"inner\",\n",
" lsuffix=\"_x\",\n",
" rsuffix=\"_y\",\n",
" suffixes=(\"_x\", \"_y\"),\n",
")\n",
"inner_joined_total.head()"
]
Expand All @@ -6434,7 +6433,7 @@
"source": [
"Because `.join()` works on indexes, if we want to recreate `merge()` before, then we must set indexes on the join columns we specify. In this example, you used the `.set_index()` method to set your indexes to the key columns within the join. \n",
"\n",
"Below you will see an almost-bare `.join()` call. Because there are overlapping columns, you will have to specify a suffix with `lsuffix`, `rsuffix`, or both, but this example will demonstrate the more typical behavior of `.join()`."
"Below you will see an almost-bare `.join()` call. Because there are overlapping columns, you will have to specify at least one suffix with `suffixes`, but this example will demonstrate the more typical behavior of `.join()`."
]
},
{
Expand Down Expand Up @@ -7322,7 +7321,7 @@
}
],
"source": [
"climate_temp.join(climate_precip, lsuffix=\"_left\")"
"climate_temp.join(climate_precip, suffixes=(\"_left\", \"\"))"
]
},
{
Expand Down
Loading