Return a list of bools of length `column_count` which indicates whether number parsing should be used on each column. If `disable_numparse` is a list of indices, each of those indices are False, and everything else is True. If `disable_numparse` is a bool, then the returned list
(disable_numparse, column_count)
| 2522 | |
| 2523 | |
| 2524 | def _expand_numparse(disable_numparse, column_count): |
| 2525 | """ |
| 2526 | Return a list of bools of length `column_count` which indicates whether |
| 2527 | number parsing should be used on each column. |
| 2528 | If `disable_numparse` is a list of indices, each of those indices are False, |
| 2529 | and everything else is True. |
| 2530 | If `disable_numparse` is a bool, then the returned list is all the same. |
| 2531 | """ |
| 2532 | if isinstance(disable_numparse, Iterable): |
| 2533 | numparses = [True] * column_count |
| 2534 | for index in disable_numparse: |
| 2535 | numparses[index] = False |
| 2536 | return numparses |
| 2537 | else: |
| 2538 | return [not disable_numparse] * column_count |
| 2539 | |
| 2540 | |
| 2541 | def _expand_iterable(original, num_desired, default): |