Extract combined index: return intersection or union (depending on the value of "intersect") of indexes on given axis, or None if all objects lack indexes (e.g. they are numpy arrays). Parameters ---------- objs : list Series or DataFrame objects, may be mix of the
(
objs,
intersect: bool = False,
axis: Axis = 0,
sort: bool | lib.NoDefault = True,
)
| 61 | |
| 62 | |
| 63 | def get_objs_combined_axis( |
| 64 | objs, |
| 65 | intersect: bool = False, |
| 66 | axis: Axis = 0, |
| 67 | sort: bool | lib.NoDefault = True, |
| 68 | ) -> Index: |
| 69 | """ |
| 70 | Extract combined index: return intersection or union (depending on the |
| 71 | value of "intersect") of indexes on given axis, or None if all objects |
| 72 | lack indexes (e.g. they are numpy arrays). |
| 73 | |
| 74 | Parameters |
| 75 | ---------- |
| 76 | objs : list |
| 77 | Series or DataFrame objects, may be mix of the two. |
| 78 | intersect : bool, default False |
| 79 | If True, calculate the intersection between indexes. Otherwise, |
| 80 | calculate the union. |
| 81 | axis : {0 or 'index', 1 or 'outer'}, default 0 |
| 82 | The axis to extract indexes from. |
| 83 | sort : bool, default True |
| 84 | Whether the result index should come out sorted or not. NoDefault |
| 85 | use for deprecation in GH#57335. |
| 86 | |
| 87 | Returns |
| 88 | ------- |
| 89 | Index |
| 90 | """ |
| 91 | obs_idxes = [obj._get_axis(axis) for obj in objs] |
| 92 | return _get_combined_index(obs_idxes, intersect=intersect, sort=sort) |
| 93 | |
| 94 | |
| 95 | def _get_distinct_objs(objs: list[Index]) -> list[Index]: |
no test coverage detected