def distant_iv_pairs_rowdata(mobj, rec):
    """Generate list of 'Distant I-V pairs' record data, which is output in csv format

    mobj is parsed object given by Parser.parse()
    rec is record data in mobj['Cascade Detail']['records']
    """
    rowdata = [mobj['Index']['Cascade'], mobj['Index']['Group'], mobj[
        'Index']['Number']]
    rowdata += [rec['Pair Number'], rec['Vacancy Site'], rec['Vacancy File'
        ], rec['Interstitial Atom'], rec['Interstitial File'], rec['Distance']]
    vacfile = rec['Vacancy File']
    intfile = rec['Interstitial File']
    if 'Lattice Sites' in mobj:
        vacdata = mobj['Lattice Sites']['records'][vacfile - 1]
        vacrowdata = [vacdata['Location X'], vacdata['Location Y'], vacdata
            ['Location Z']]
    else:
        vacrowdata = [None] * 3
    if 'Cascade Detail' in mobj:
        intdata = mobj['Cascade Detail']['records'][intfile - 1]
        introwdata = [intdata['Final Location X'], intdata[
            'Final Location Y'], intdata['Final Location Z']]
    else:
        introwdata = [None] * 3
    rowdata += vacrowdata
    rowdata += introwdata
    return rowdata
