def _repr_html_(self) -> str:
    max_display_count = get_option('display.max_rows')
    if (max_display_count is None):
        return self._to_internal_pandas().to_html(notebook=True)
    pdf = self._get_or_create_repr_pandas_cache(max_display_count)
    pdf_length = len(pdf)
    pdf = pdf.iloc[:max_display_count]
    if (pdf_length > max_display_count):
        repr_html = pdf.to_html(show_dimensions=True, notebook=True)
        match = REPR_HTML_PATTERN.search(repr_html)
        if (match is not None):
            nrows = match.group('rows')
            ncols = match.group('columns')
            by = chr(215)
            footer = '\n<p>Showing only the first {rows} rows {by} {cols} columns</p>\n</div>'.format(rows=nrows, by=by, cols=ncols)
            return REPR_HTML_PATTERN.sub(footer, repr_html)
    return pdf.to_html(notebook=True)
def _repr_html_(self) -> str:
    max_display_count = get_option('display.max_rows')
    if (max_display_count is None):
        return self._to_internal_pandas().to_html(notebook=True)
    pdf = self._get_or_create_repr_pandas_cache(max_display_count)
    pdf_length = len(pdf)
    pdf = pdf.iloc[:max_display_count]
    if (pdf_length > max_display_count):
        repr_html = pdf.to_html(show_dimensions=True, notebook=True)
        match = REPR_HTML_PATTERN.search(repr_html)
        if (match is not None):
            nrows = match.group('rows')
            ncols = match.group('columns')
            by = chr(215)
            footer = '\n<p>Showing only the first {rows} rows {by} {cols} columns</p>\n</div>'.format(rows=nrows, by=by, cols=ncols)
            return REPR_HTML_PATTERN.sub(footer, repr_html)
    return pdf.to_html(notebook=True)