pandas.Index.equals

Index.equals(self, other)bool[source]

Determine if two Index objects contain the same elements.

Returns
bool

True if “other” is an Index and it has the same elements as calling index; False otherwise.