dataframely.require_relationship_one_to_one#
- dataframely.require_relationship_one_to_one(
- lhs: LazyFrame[S] | LazyFrame,
- rhs: LazyFrame[T] | LazyFrame,
- /,
- on: str | list[str],
- *,
- drop_duplicates: bool = True,
Express a 1:1 mapping between data frames for a collection filter.
- Parameters:
lhs – The first data frame in the 1:1 mapping.
rhs – The second data frame in the 1:1 mapping.
on – The columns to join the data frames on.
drop_duplicates – If set to
True, drops rows that 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 in one or both of the data frames are 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 relationship.