(*input: pw.Table)
| 17 | |
| 18 | |
| 19 | def _create_input_table(*input: pw.Table): |
| 20 | def as_tuple(*args): |
| 21 | return args |
| 22 | |
| 23 | result = [] |
| 24 | for idx, table in enumerate(input): |
| 25 | tupled_cols = table.select( |
| 26 | all_cols=pw.apply(as_tuple, table.id, *_table_columns(table)) |
| 27 | ) |
| 28 | reduced = tupled_cols.reduce( |
| 29 | **{f"_{idx}": pw.reducers.sorted_tuple(tupled_cols.all_cols)} |
| 30 | ) |
| 31 | result.append(reduced) |
| 32 | |
| 33 | def _add_tables(first: pw.Table, *tables: pw.Table) -> pw.Table: |
| 34 | for table in tables: |
| 35 | first += table.with_universe_of(first) |
| 36 | return first |
| 37 | |
| 38 | return _add_tables(*result) |
| 39 | |
| 40 | |
| 41 | def _argument_index(func_spec: FunctionSpec, arg: str | int | None) -> int | None: |
no test coverage detected