Skip to content

Commit 18618f3

Browse files
committed
shortening the section on joiners
1 parent 9af00c2 commit 18618f3

1 file changed

Lines changed: 3 additions & 33 deletions

File tree

examples/00_getting_started.py

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@
177177
# See :ref:`user_guide_encoders_index` for more details on all the categorical encoders
178178
# provided by skrub, and :ref:`sphx_glr_auto_examples_01_encodings.py` for a
179179
# comparison between the different methods.
180+
#
180181

181182
# %%
182183
# Assembling data
@@ -191,39 +192,8 @@
191192
# You can control how distant fuzzy-matches are allowed to be with the
192193
# ``max_dist`` parameter.
193194

194-
# %%
195-
# In the following, we add information about countries to a table containing
196-
# airports and the cities they are in:
197-
198-
# %%
199-
import pandas as pd
200-
201-
from skrub import Joiner
202-
203-
airports = pd.DataFrame(
204-
{
205-
"airport_id": [1, 2],
206-
"airport_name": ["Charles de Gaulle", "Aeroporto Leonardo da Vinci"],
207-
"city": ["Paris", "Roma"],
208-
}
209-
)
210-
# Notice the "Rome" instead of "Roma"
211-
capitals = pd.DataFrame(
212-
{"capital": ["Berlin", "Paris", "Rome"], "country": ["Germany", "France", "Italy"]}
213-
)
214-
joiner = Joiner(
215-
capitals,
216-
main_key="city",
217-
aux_key="capital",
218-
max_dist=0.8,
219-
add_match_info=False,
220-
)
221-
joiner.fit_transform(airports)
222-
223-
# %%
224-
# Information about countries has been added, even if the rows aren't exactly matching.
225-
#
226-
# Skrub allows you to aggregate multiple tables according to various strategies. You
195+
# Skrub also allows you to aggregate multiple tables according to various strategies.
196+
# You
227197
# can see other ways to join multiple tables in :ref:`user_guide_joining_dataframes`.
228198

229199
# %%

0 commit comments

Comments
 (0)