Return the formatted data as a unicode string.
(self, name=None)
| 1460 | |
| 1461 | @final |
| 1462 | def _format_data(self, name=None) -> str_t: |
| 1463 | """ |
| 1464 | Return the formatted data as a unicode string. |
| 1465 | """ |
| 1466 | # do we want to justify (only do so for non-objects) |
| 1467 | is_justify = True |
| 1468 | |
| 1469 | if self.inferred_type == "string": |
| 1470 | is_justify = False |
| 1471 | elif isinstance(self.dtype, CategoricalDtype): |
| 1472 | self = cast("CategoricalIndex", self) |
| 1473 | if is_string_dtype(self.categories.dtype): |
| 1474 | is_justify = False |
| 1475 | elif isinstance(self, ABCRangeIndex): |
| 1476 | # We will do the relevant formatting via attrs |
| 1477 | return "" |
| 1478 | |
| 1479 | return format_object_summary( |
| 1480 | self, |
| 1481 | self._formatter_func, |
| 1482 | is_justify=is_justify, |
| 1483 | name=name, |
| 1484 | line_break_each_value=self._is_multi, |
| 1485 | ) |
| 1486 | |
| 1487 | def _format_attrs(self) -> list[tuple[str_t, str_t | int | bool | None]]: |
| 1488 | """ |
no test coverage detected