def __repr__(self) -> str:
    max_display_count = get_option('display.max_rows')
    if (max_display_count is None):
        return self._to_internal_pandas().to_string()
    pdf = cast('DataFrame', self._get_or_create_repr_pandas_cache(max_display_count))
    pdf_length = len(pdf)
    pdf = cast('DataFrame', pdf.iloc[:max_display_count])
    if (pdf_length > max_display_count):
        repr_string = pdf.to_string(show_dimensions=True)
        match = REPR_PATTERN.search(repr_string)
        if (match is not None):
            nrows = match.group('rows')
            ncols = match.group('columns')
            footer = '\n\n[Showing only the first {nrows} rows x {ncols} columns]'.format(nrows=nrows, ncols=ncols)
            return REPR_PATTERN.sub(footer, repr_string)
    return pdf.to_string()
def __repr__(self) -> str:
    max_display_count = get_option('display.max_rows')
    if (max_display_count is None):
        return self._to_internal_pandas().to_string()
    pdf = cast('DataFrame', self._get_or_create_repr_pandas_cache(max_display_count))
    pdf_length = len(pdf)
    pdf = cast('DataFrame', pdf.iloc[:max_display_count])
    if (pdf_length > max_display_count):
        repr_string = pdf.to_string(show_dimensions=True)
        match = REPR_PATTERN.search(repr_string)
        if (match is not None):
            nrows = match.group('rows')
            ncols = match.group('columns')
            footer = '\n\n[Showing only the first {nrows} rows x {ncols} columns]'.format(nrows=nrows, ncols=ncols)
            return REPR_PATTERN.sub(footer, repr_string)
    return pdf.to_string()