Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions dataframely/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ def require_relationship_one_to_at_least_one(
columns, filtered to ensure a 1:{1,N} relationship.
"""
if drop_duplicates:
return lhs.unique(on, keep="none").join(rhs.unique(on), on=on)
return lhs.unique(on, keep="none").join(rhs, on=on, how="semi")

return lhs.join(rhs.unique(on), on=on)
return lhs.join(rhs, on=on, how="semi")
Comment thread
borchero marked this conversation as resolved.


# ------------------------------------------------------------------------------------ #
Expand Down
4 changes: 2 additions & 2 deletions tests/benches/test_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ def partitioned_dataset(dataset: pl.DataFrame) -> dict[str, pl.DataFrame]:
"elevation",
"aspect",
"slope",
idx=pl.int_range(pl.len(), dtype=pl.UInt32),
idx=pl.int_range(pl.len(), dtype=pl.UInt32).shuffle(),
),
"second": dataset.select(
"horizontal_distance_to_hydrology",
"vertical_distance_to_hydrology",
"horizontal_distance_to_roadways",
idx=pl.int_range(pl.len(), dtype=pl.UInt32),
idx=pl.int_range(pl.len(), dtype=pl.UInt32).shuffle(),
),
}

Expand Down
Loading