标签: python pandas
我有一个pandas dataFrame对象,我想检查它的索引字段是否为multiIndex,或者索引是"长度为1"。例如:
def myFunction(self, dataFrame): if is_multi_index(dataFrame): dostuff() @staticmethod def is_multi_index(dataFrame): # how to code?