def write_csv(paths, headers):
    """
    Takes in an array of .csv paths and appends them all together using
    python fucntions. This allows us to pull in a large dataset, relying
    on disk space, while preserving limited system memory.
    """
    csv_out = "consolidated.csv"
    csv_merge = open(csv_out, "w")
    csv_merge.write(headers)
    csv_merge.write("\n")

    for path in paths:
        with open(path, "r") as data:
            csv = data.read()
        csv_merge.write(csv)
    return csv_out