We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00b3cd9 commit 18756a5Copy full SHA for 18756a5
pandas/io/formats/format.py
@@ -78,7 +78,6 @@
78
)
79
from pandas.core.indexes.datetimes import DatetimeIndex
80
from pandas.core.indexes.timedeltas import TimedeltaIndex
81
-from pandas.core.reshape.concat import concat
82
83
from pandas.io.common import (
84
check_parent_directory,
@@ -245,7 +244,11 @@ def _chk_truncate(self) -> None:
245
244
series = series.iloc[:max_rows]
246
else:
247
row_num = max_rows // 2
248
- series = concat((series.iloc[:row_num], series.iloc[-row_num:]))
+ _len = len(series)
+ _slice = np.hstack(
249
+ [np.arange(row_num), np.arange(_len - row_num, _len)]
250
+ )
251
+ series = series.iloc[_slice]
252
self.tr_row_num = row_num
253
254
self.tr_row_num = None
0 commit comments