We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6ca614 commit c2e2cb3Copy full SHA for c2e2cb3
pandas/core/generic.py
@@ -4461,7 +4461,7 @@ def sort_index(
4461
target = target._sort_levels_monotonic()
4462
4463
indexer = lexsort_indexer(
4464
- target._get_codes_for_sorting(),
+ target._get_codes_for_sorting(), # type: ignore[attr-defined]
4465
orders=ascending,
4466
na_position=na_position,
4467
)
@@ -4501,7 +4501,9 @@ def sort_index(
4501
new_index = new_index._sort_levels_monotonic()
4502
4503
new_values = self._values.take(indexer)
4504
- result = self._constructor(new_values, index=new_index)
+ result = self._constructor(
4505
+ new_values, index=new_index # type: ignore[call-arg]
4506
+ )
4507
4508
if ignore_index:
4509
result.index = ibase.default_index(len(result))
0 commit comments