Sindbad~EG File Manager
�
Mٜg�( � � � d dl mZ d dlZd dlmZmZ d dlZd dlm Z m
Z
d dlmZ d dl
mZ d dlmZ d dlmZmZmZmZmZ d d lmZ d d
lmZ d dlmZ d dlmZ d d
lm Z d dl!m"Z" d dl#m$Z$ erd dl%m&Z& ejN d� Z(g d�Z) d dd�Z*dd�Z+ d dd�Z,d d�Z-d!d"d�Z.d� Z/d#d�Z0d$d�Z1y)%� )�annotationsN)�
TYPE_CHECKING�cast)�NaT�lib)�InvalidIndexError)�find_common_type)� safe_sort)�Index�
_new_Index�ensure_index�ensure_index_from_sequences�get_unanimous_names)�CategoricalIndex)�
DatetimeIndex)�
IntervalIndex)�
MultiIndex)�PeriodIndex)�
RangeIndex)�TimedeltaIndex)�Axisz�Sorting because non-concatenation axis is not aligned. A future version
of pandas will change to not sort by default.
To accept the future behavior, pass 'sort=False'.
To retain the current behavior and silence the warning, pass 'sort=True'.
)r r r r r r r r r r r r
r �get_objs_combined_axis�
union_indexesr �all_indexes_same�
default_index�safe_sort_indexc �f � | D �cg c] }|j |� �� }}t ||||�� S c c}w )a�
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 two.
intersect : bool, default False
If True, calculate the intersection between indexes. Otherwise,
calculate the union.
axis : {0 or 'index', 1 or 'outer'}, default 0
The axis to extract indexes from.
sort : bool, default True
Whether the result index should come out sorted or not.
copy : bool, default False
If True, return a copy of the combined index.
Returns
-------
Index
)� intersect�sort�copy)� _get_axis�_get_combined_index)�objsr �axisr r �obj� obs_idxess �B/usr/local/lib/python3.12/site-packages/pandas/core/indexes/api.pyr r H s7 � �<