File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 55from __future__ import annotations
66
77from collections import abc
8+ from itertools import pairwise
89import types
910from typing import (
1011 TYPE_CHECKING ,
@@ -417,18 +418,11 @@ def concat(
417418 if (
418419 intersect
419420 or any (not isinstance (index , DatetimeIndex ) for index in non_concat_axis )
420- or all (
421- prev is curr
422- for prev , curr in zip (
423- non_concat_axis , non_concat_axis [1 :], strict = False
424- )
425- )
421+ or all (prev is curr for prev , curr in pairwise (non_concat_axis ))
426422 or (
427423 all (
428424 prev [- 1 ] <= curr [0 ] and prev .is_monotonic_increasing
429- for prev , curr in zip (
430- non_concat_axis , non_concat_axis [1 :], strict = False
431- )
425+ for prev , curr in pairwise (non_concat_axis )
432426 if not prev .empty and not curr .empty
433427 )
434428 and non_concat_axis [- 1 ].is_monotonic_increasing
You can’t perform that action at this time.
0 commit comments