def partition_lines(lines, step=1000000):
    'Note: line numbers are **1-based**\n    '
    lo = pd.DataFrame.from_records([dict(start=lo, qty=min(((lines + 1) - lo), step), lines=lines) for lo in range(1, (lines + 1), step)])
    return lo
Note: line numbers are **1-based**
def partition_lines(lines, step=1000000):
    '\n    '
    lo = pd.DataFrame.from_records([dict(start=lo, qty=min(((lines + 1) - lo), step), lines=lines) for lo in range(1, (lines + 1), step)])
    return lo