def _expand_elements(body):
    lens = Series(lmap(len, body))
    lens_max = lens.max()
    not_max = lens[lens != lens_max]

    empty = ['']
    for ind, length in iteritems(not_max):
        body[ind] += empty * (length - lens_max)
dataset/ETHPy150Open pydata/pandas/pandas/io/html.py/_expand_elements/swapped operands of `-`