Skip to content

Commit 571aee8

Browse files
typing
1 parent 3e264d6 commit 571aee8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/core/arrays/categorical.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2237,7 +2237,8 @@ def _repr_categories(self) -> list[str]:
22372237
if self.categories.dtype == "str":
22382238
# the extension array formatter defaults to boxed=True in format_array
22392239
# override here to boxed=False to be consistent with QUOTE_NONNUMERIC
2240-
formatter = self.categories._values._formatter(boxed=False)
2240+
arr: ExtensionArray = self.categories._values
2241+
formatter = arr._formatter(boxed=False)
22412242

22422243
format_array = partial(
22432244
fmt.format_array, formatter=formatter, quoting=QUOTE_NONNUMERIC

0 commit comments

Comments
 (0)