Assumes horizontal table (each value has a separate column).
(self, key: str)
| 39 | assert row == value |
| 40 | |
| 41 | def get_column_value(self, key: str) -> Optional[List[str]]: |
| 42 | """ |
| 43 | Assumes horizontal table (each value has a separate column). |
| 44 | """ |
| 45 | if self.header is None: |
| 46 | raise Exception(f"This table is not horizontal!\n{self}") |
| 47 | if key not in self.header: |
| 48 | return None |
| 49 | |
| 50 | index = self.header.index(key) |
| 51 | return [row[index] for row in self.rows] |
| 52 | |
| 53 | def check_column_value(self, key: str, index: int, value: str): |
| 54 | column = self.get_column_value(key) |