Esempio n. 1
0
def main(infilename, outfilename):
    """
    Contains high-level logic of the script.
    """
    # read INPUT file into a Pandas DataFrame
    inputdf = pd.read_csv(infilename)

    # translate INPUT variables into OUTPUT lines
    olines = ''
    for idx in range(0, inputdf.shape[0]):
        rec = inputdf.xs(idx)
        odict = extract_output(rec)
        olines += SimpleTaxIO.construct_output_line(odict)

    # write OUTPUT lines to OUTPUT file
    with open(outfilename, 'w') as outfile:
        outfile.write(olines)

    # return no-error exit code
    return 0
def main(infilename, outfilename):
    """
    Contains high-level logic of the script.
    """
    # read INPUT file into a Pandas DataFrame
    inputdf = pd.read_csv(infilename)

    # translate INPUT variables into OUTPUT lines
    olines = ''
    for idx in range(0, inputdf.shape[0]):
        rec = inputdf.xs(idx)
        odict = extract_output(rec)
        olines += SimpleTaxIO.construct_output_line(odict)

    # write OUTPUT lines to OUTPUT file
    with open(outfilename, 'w') as outfile:
        outfile.write(olines)

    # return no-error exit code
    return 0