Skip to content

Commit 6b45ac5

Browse files
committed
Revert "replace concat with np"
This reverts commit b48fc35.
1 parent b48fc35 commit 6b45ac5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/io/formats/format.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -669,9 +669,9 @@ def _truncate_horizontally(self) -> None:
669669
assert self.max_cols_fitted is not None
670670
col_num = self.max_cols_fitted // 2
671671
if col_num >= 1:
672-
_len = len(self.tr_frame.columns)
673-
_slice = np.hstack([np.arange(col_num), np.arange(_len - col_num, _len)])
674-
self.tr_frame = self.tr_frame.iloc[:, _slice]
672+
left = self.tr_frame.iloc[:, :col_num]
673+
right = self.tr_frame.iloc[:, -col_num:]
674+
self.tr_frame = concat((left, right), axis=1)
675675

676676
# truncate formatter
677677
if isinstance(self.formatters, (list, tuple)):

0 commit comments

Comments
 (0)