def _find_max_nonempty_row(data):
    """Identify the index of largest row in a table that is not all Nones

    Empty rows sandwiched between populated rows will not mistakenly be identified as indicating
    the end of the populated data.

    Args:
        data (list): A list of lists, with each sublist representing a row in the table

    Returns:
        int: Index associated with the last non-empty row (i.e. the last list that is not all Nones)
    """
    is_not_empty = lambda row: row.count(None) != len(row)
    nonempty_rows = list(map(is_not_empty, data))

    if nonempty_rows.count(True):
        max_nonempty_index = max(loc for loc, val in enumerate(nonempty_rows) if val)
        return max_nonempty_index