from typing import IO
import csv


def startfile_csv(ARG_filewriter: IO):
    """Writes the header for the .csv suncalc results file.

    Parameters
    ----------
    ARG_filewriter : IO
        The file writing IO object.
    
    Returns
    -------
    csvwriter : csv._writer
        The IO object formatted specifically for this csv file.
    """
    csvwriter = csv.writer(ARG_filewriter, lineterminator="\n", quoting=csv.QUOTE_NONNUMERIC)
    csvheaders = ["DAY", "HOUR24", "MINUTE", "FRACTIONAL DAY", "DATESTRING", "ALTITUDE", "AZIMUTH"]
    csvwriter.writerow (csvheaders)
    return csvwriter