Add a left-most index column.
(rows, index)
| 624 | |
| 625 | |
| 626 | def _prepend_row_index(rows, index): |
| 627 | """Add a left-most index column.""" |
| 628 | if index is None or index is False: |
| 629 | return rows |
| 630 | if len(index) != len(rows): |
| 631 | print('index=', index) |
| 632 | print('rows=', rows) |
| 633 | raise ValueError('index must be as long as the number of data rows') |
| 634 | rows = [[v]+list(row) for v,row in zip(index, rows)] |
| 635 | return rows |
| 636 | |
| 637 | |
| 638 | def _bool(val): |
no outgoing calls
no test coverage detected