Similar to equals, but checks that object attributes and types are also equal.
If two Index objects have equal elements and same type True, otherwise False.
Examples
>>> idx1 = pd.Index(['1', '2', '3'])
>>> idx2 = pd.Index(['1', '2', '3'])
>>> idx2.identical(idx1)
True
>>> idx1 = pd.Index(['1', '2', '3'], name="A")
>>> idx2 = pd.Index(['1', '2', '3'], name="B")
>>> idx2.identical(idx1)
False
© 2008–2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
© 2011–2025, Open source contributors
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.3.0/reference/api/pandas.Index.identical.html