pandas.Index.is_#
- final Index.is_(other)[源代码]#
更灵活、更快的 is 检查,但它会通过视图工作。
注意:这与
Index.identical()不同,后者会检查元数据是否也相同。- Parameters:
- otherobject
要与之比较的其他对象。
- Returns:
- bool
如果两者具有相同的底层数据,则为 True,否则为 False。
参见
Index.identical其工作方式类似于
Index.is_,但也会检查元数据。
Examples
>>> idx1 = pd.Index(['1', '2', '3']) >>> idx1.is_(idx1.view()) True
>>> idx1.is_(idx1.copy()) False