()
| 23 | |
| 24 | |
| 25 | def test_ix_optional(): |
| 26 | t_animals = T( |
| 27 | """ |
| 28 | | genus | epithet |
| 29 | 1 | upupa | epops |
| 30 | 2 | acherontia | atropos |
| 31 | 3 | bubo | scandiacus |
| 32 | """ |
| 33 | ) |
| 34 | t_indexer = T( |
| 35 | """ |
| 36 | | indexer |
| 37 | 0 | 3 |
| 38 | 1 | 1 |
| 39 | 2 | 0 |
| 40 | 3 | 4 |
| 41 | 4 | 2 |
| 42 | """, |
| 43 | ).with_columns(indexer=pw.this.pointer_from(pw.this.indexer)) |
| 44 | ret = t_animals.ix(t_indexer.indexer, allow_misses=True).filter( |
| 45 | pw.this.genus.is_not_none() |
| 46 | )[["genus"]] |
| 47 | expected = T( |
| 48 | """ |
| 49 | | genus |
| 50 | 0 | bubo |
| 51 | 1 | upupa |
| 52 | 4 | acherontia |
| 53 | """ |
| 54 | ) |
| 55 | assert_table_equality(ret, expected) |
| 56 | |
| 57 | |
| 58 | def test_unpack_col(): |
nothing calls this directly
no test coverage detected