Skip to content

Join #745

@lars-reimann

Description

@lars-reimann

Is your feature request related to a problem?

Sometimes a dataset consists of multiple tables.

Desired solution

Add a new method Table.join that performs a join.

  • Parameters:
    • right: Table - The other table to join.
    • left_names: str | list[str] - The names of the columns to join on in the left table (receiver)
    • right_names: str | list[str] - The names of the columns to join on in the right table (right parameter)
    • Keyword-only mode: literal["inner", "left", "outer"] = "inner" - Whether an inner/left/outer join should be performed.
  • Exceptions:
    • Call _check_columns_exist to ensure that all left_names exist in the left table.
    • Call _check_columns_exist to ensure that all right_names exist in the right table.
    • Raise if the length of left_names and right_names differs.
  • Returns:
    • A new table containing the result of the join.

Use DataFrame.join to implement this operation.

Possible alternatives (optional)

We could also add a join mode "right", but that is equivalent to swapping the left and right table.

Screenshots (optional)

No response

Additional Context (optional)

No response

Metadata

Metadata

Labels

releasedIncluded in a release

Type

No type

Projects

Status

✔️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions