dataframely.require_relationship_one_to_at_least_one#
- dataframely.require_relationship_one_to_at_least_one(
- lhs: LazyFrame[S] | LazyFrame,
- rhs: LazyFrame[T] | LazyFrame,
- /,
- on: str | list[str],
- *,
- drop_duplicates: bool = True,
Express a 1:{1,N} mapping between data frames for a collection filter.
- Parameters:
lhs – The data frame with exactly one occurrence for the set of join columns.
rhs – The data frame with at least one occurrence for the set of join columns.
on – The columns to join the data frames on.
drop_duplicates – If set to
True, drops rows inlhsthat are not uniquely identified by the join columns specified withon. If set toFalse, skips uniqueness checks and avoids performance penalties. Use with caution, as this may lead to unexpected results if rows inlhsare not unique in the join columns.
- Returns:
A data frame representing the inner join of the two inputs on the specified columns, filtered to ensure a 1:{1,N} relationship.