Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add non-equi joins to, and revise, joins docs page #19127

Merged
merged 11 commits into from
Oct 10, 2024
28 changes: 0 additions & 28 deletions docs/source/_build/scripts/prep_data.py

This file was deleted.

25 changes: 25 additions & 0 deletions docs/source/src/python/user-guide/transformations/joins.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
import requests


DATA = [
(
"https://raw.githubusercontent.com/pola-rs/polars-static/refs/heads/master/data/monopoly_props_groups.csv",
"docs/assets/data/monopoly_props_groups.csv",
),
(
"https://raw.githubusercontent.com/pola-rs/polars-static/refs/heads/master/data/monopoly_props_prices.csv",
"docs/assets/data/monopoly_props_prices.csv",
),
]


for url, dest in DATA:
rodrigogiraoserrao marked this conversation as resolved.
Show resolved Hide resolved
with open(dest, "wb") as f:
try:
f.write(requests.get(url, timeout=10).content)
except Exception as e:
print(f"WARNING: failed to download file {dest} ({e})")
else:
print(f"INFO: downloaded {dest}")


# --8<-- [start:props_groups]
import polars as pl

Expand Down
3 changes: 3 additions & 0 deletions docs/source/src/rust/user-guide/transformations/joins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ use polars::prelude::*;
// --8<-- [end:setup]

fn main() -> Result<(), Box<dyn std::error::Error>> {
// NOTE: This assumes the data has been downloaded and is available.
// See the corresponding Python script for the remote location of the data.

// --8<-- [start:props_groups]
let props_groups = CsvReadOptions::default()
.with_has_header(true)
Expand Down
1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ markdown_extensions:

hooks:
- docs/source/_build/scripts/people.py
- docs/source/_build/scripts/prep_data.py

plugins:
- search:
Expand Down
Loading