()
| 4028 | |
| 4029 | |
| 4030 | def test_groupby_instance(): |
| 4031 | t = T( |
| 4032 | """ |
| 4033 | a | b | col |
| 4034 | 0 | 0 | 1 |
| 4035 | 0 | 0 | 2 |
| 4036 | 1 | 0 | 3 |
| 4037 | 1 | 0 | 4 |
| 4038 | 0 | 1 | 5 |
| 4039 | 0 | 1 | 6 |
| 4040 | """ |
| 4041 | ) |
| 4042 | expected = T( |
| 4043 | """ |
| 4044 | a | b | col |
| 4045 | 0 | 0 | 3 |
| 4046 | 1 | 0 | 7 |
| 4047 | 0 | 1 | 11 |
| 4048 | """ |
| 4049 | ).with_id_from(pw.this.b, instance=pw.this.a) |
| 4050 | |
| 4051 | res = t.groupby(pw.this.b, instance=pw.this.a).reduce( |
| 4052 | pw.this.a, pw.this.b, col=pw.reducers.sum(pw.this.col) |
| 4053 | ) |
| 4054 | assert_table_equality(res, expected) |
| 4055 | |
| 4056 | |
| 4057 | def test_join_ix(): |
nothing calls this directly
no test coverage detected