python pandas 如何获取一级索引

这里是多层索引,我想获取顶层一级索引

img

使用df.index 获取的是

img


```go
        print(file_output4_2_new)
        print(file_output4_2_new.index)

```

你这个是groupby过,还是dropna后的结果。