pandas.Index.intersection
-
Index.intersection(other)[source] -
Формирование пересечения двух объектов Index.
Это возвращает новый Index с элементами, общими для индекса и
other, сохраняя порядок вызываемого индекса.Параметры: other : Index или массив-подобный объект Возвращает: пересечение : Index Примеры
>>> idx1 = pd.Index([1, 2, 3, 4]) >>> idx2 = pd.Index([3, 4, 5, 6]) >>> idx1.intersection(idx2) Int64Index([3, 4], dtype='int64')
© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.21.1/generated/pandas.Index.intersection.html