def merge(data, delimiter=","):
    """
    Merge rows with an equal starting index from an array of CSV data rows.

    Args:
        data (list): input list of string rows or row values as a list to merge.
        delimiter (str): delimiter of the CSV format to use for value splitting.

    Returns:
        merged list of rows in string format.
    """
    data_merged = []
    row_merged = []

    # Register an empty field.
    id = None

    for row in data:
        # Convert our string row into a list of strings if it's not already one.
        values = row.split(delimiter) if type(row) is str else row

        # Assign a value if this is the first run.
        if not id:
            id = values[0]
            row_merged.append(id)

        # If our identifier does not match up with the last, append the row and reset.
        if values[0] != id:
            data_merged.append(row_merged)
            row_merged = []

            id = values[0]
            row_merged.append(id)

        # Begin iteration over values skipping our identifier.
        for value in values[1:]:
            row_merged.append(value)

        # If this is the last row append it.
        if row == data[-1]:
            data_merged.append(row_merged)

    return data_merged