@@ -47,20 +47,20 @@ def _get_objs_combined_axis(objs, intersect=False, axis=0, sort=True):
47
47
"""
48
48
Extract combined index: return intersection or union (depending on the
49
49
value of "intersect") of indexes on given axis, or None if all objects
50
- lack indexes (e.g. they are numpy arrays)
50
+ lack indexes (e.g. they are numpy arrays).
51
51
52
52
Parameters
53
53
----------
54
54
objs : list of objects
55
55
Each object will only be considered if it has a _get_axis
56
- attribute
56
+ attribute.
57
57
intersect : boolean, default False
58
58
If True, calculate the intersection between indexes. Otherwise,
59
- calculate the union
59
+ calculate the union.
60
60
axis : {0 or 'index', 1 or 'outer'}, default 0
61
- The axis to extract indexes from
61
+ The axis to extract indexes from.
62
62
sort : boolean, default True
63
- Whether the result index should come out sorted or not
63
+ Whether the result index should come out sorted or not.
64
64
65
65
Returns
66
66
-------
@@ -74,17 +74,17 @@ def _get_objs_combined_axis(objs, intersect=False, axis=0, sort=True):
74
74
75
75
def _get_combined_index (indexes , intersect = False , sort = False ):
76
76
"""
77
- Return the union or intersection of indexes
77
+ Return the union or intersection of indexes.
78
78
79
79
Parameters
80
80
----------
81
81
indexes : a list of Index or list objects
82
- When intersect=True, do not accept list of lists
82
+ When intersect=True, do not accept list of lists.
83
83
intersect : boolean, default False
84
84
If True, calculate the intersection between indexes. Otherwise,
85
- calculate the union
85
+ calculate the union.
86
86
sort : boolean, default False
87
- Whether the result index should come out sorted or not
87
+ Whether the result index should come out sorted or not.
88
88
89
89
Returns
90
90
-------
@@ -115,15 +115,15 @@ def _get_combined_index(indexes, intersect=False, sort=False):
115
115
116
116
def _union_indexes (indexes , sort = True ):
117
117
"""
118
- Return the union of indexes
118
+ Return the union of indexes.
119
119
120
120
The behavior of sort and names is not consistent.
121
121
122
122
Parameters
123
123
----------
124
124
indexes : a list of Index or list objects
125
125
sort : boolean, default True
126
- Whether the result index should come out sorted or not
126
+ Whether the result index should come out sorted or not.
127
127
128
128
Returns
129
129
-------
@@ -141,7 +141,7 @@ def _union_indexes(indexes, sort=True):
141
141
142
142
def _unique_indices (inds ):
143
143
"""
144
- Convert indexes to lists and concatenate them, removing duplicates
144
+ Convert indexes to lists and concatenate them, removing duplicates.
145
145
146
146
The final dtype is inferred.
147
147
@@ -192,7 +192,7 @@ def conv(i):
192
192
193
193
def _sanitize_and_check (indexes ):
194
194
"""
195
- Verify the type of indexes and convert lists to Index
195
+ Verify the type of indexes and convert lists to Index.
196
196
197
197
Cases:
198
198
@@ -230,7 +230,7 @@ def _sanitize_and_check(indexes):
230
230
231
231
def _get_consensus_names (indexes ):
232
232
"""
233
- Give a consensus 'names' to indexes
233
+ Give a consensus 'names' to indexes,
234
234
235
235
If there's exactly one non-empty 'names', return this,
236
236
otherwise, return empty.
@@ -242,7 +242,7 @@ def _get_consensus_names(indexes):
242
242
Returns
243
243
-------
244
244
list
245
- A list representing the consensus 'names' found
245
+ A list representing the consensus 'names' found.
246
246
"""
247
247
248
248
# find the non-none names, need to tupleify to make
@@ -256,7 +256,7 @@ def _get_consensus_names(indexes):
256
256
257
257
def _all_indexes_same (indexes ):
258
258
"""
259
- Determine if all indexes contain the same elements
259
+ Determine if all indexes contain the same elements.
260
260
261
261
Parameters
262
262
----------
@@ -265,7 +265,7 @@ def _all_indexes_same(indexes):
265
265
Returns
266
266
-------
267
267
boolean
268
- True if all indexes contain the same elements, False otherwise
268
+ True if all indexes contain the same elements, False otherwise.
269
269
"""
270
270
first = indexes [0 ]
271
271
for index in indexes [1 :]:
0 commit comments