Helper generator to chunk a sequence efficiently with current index like if enumerate was called on sequence.
(lst: pd.DataFrame, n: int)
| 503 | |
| 504 | |
| 505 | def chunk_helper(lst: pd.DataFrame, n: int) -> Iterator[Tuple[int, pd.DataFrame]]: |
| 506 | """Helper generator to chunk a sequence efficiently with current index like if enumerate was called on sequence.""" |
| 507 | for i in range(0, len(lst), n): |
| 508 | yield int(i / n), lst[i : i + n] |
| 509 | |
| 510 | |
| 511 | def parse_private_key_path( |
no outgoing calls
no test coverage detected