Skip to content

Commit

Permalink
improve check, remove outdated comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel committed Oct 6, 2023
1 parent a55e32d commit a0aaa19
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,7 @@ def _format_data(self, name=None) -> str_t:

if self.inferred_type == "string":
is_justify = False
elif self.inferred_type == "categorical":
elif isinstance(self.dtype, CategoricalDtype):
self = cast("CategoricalIndex", self)
if is_object_dtype(self.categories.dtype):
is_justify = False
Expand Down
1 change: 0 additions & 1 deletion pandas/core/indexes/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,6 @@ def length(self) -> Index:

# --------------------------------------------------------------------
# Rendering Methods
# __repr__ associated methods are based on MultiIndex

def _format_with_header(self, *, header: list[str], na_rep: str) -> list[str]:
# matches base class except for whitespace padding
Expand Down

0 comments on commit a0aaa19

Please sign in to comment.