Skip to content

Commit 4360846

Browse files
author
araraonline
committed
Comment _sanitize_and_check
1 parent 548a428 commit 4360846

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pandas/core/indexes/api.py

+10
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,16 @@ def conv(i):
126126

127127

128128
def _sanitize_and_check(indexes):
129+
"""Verify the type of indexes and convert lists to Index
130+
131+
Cases:
132+
133+
- [list, list, ...]: Return ([list, list, ...], 'list')
134+
- [list, Index, ...]: Return _sanitize_and_check([Index, Index, ...])
135+
Lists are sorted and converted to Index
136+
- [Index, Index, ...]: Return ([Index, Index, ...], TYPE)
137+
TYPE = 'special' if at least one special type, 'array' otherwise
138+
"""
129139
kinds = list({type(index) for index in indexes})
130140

131141
if list in kinds:

0 commit comments

Comments
 (0)