Question: I want to make a Back to top button like the page below
<https://www.k-kosho.co.jp/>

As the scroll button will be hidden, only show again when I stop the scroll.

This is my start js, hope everyone helps.

```
$(window).scroll(function() {
         if ($(this).scrollTop() != 0) {
         $('.ev-scrolltop').fadeIn();
         } else {
         $('.ev-scrolltop').fadeOut();
         }
     });

```

Thank you everyone!

Answer: 
You could use [*`get_level_values`*](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Index.get_level_values.html):

```
df[df.val >= 3].index.get_level_values(1).unique()
Index(['var', 'rf', 'uf'], dtype='object')

```
You need [`remove_unused_levels`](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.MultiIndex.remove_unused_levels.html), `new in version 0.20.0.`:

```
df1 = df[df.val >= 3]

print (df1.index)
MultiIndex(levels=[['Rad', 'Tan'], ['max', 'min', 'rf', 'uf', 'var']],
           labels=[[1, 1, 1, 0, 0, 0], [4, 2, 3, 4, 2, 3]])

df1.index = df1.index.remove_unused_levels()
print (df1.index)
MultiIndex(levels=[['Rad', 'Tan'], ['var', 'rf', 'uf']],
           labels=[[1, 1, 1, 0, 0, 0], [0, 1, 2, 0, 1, 2]])

print (df1.index.levels[1])
Index(['var', 'rf', 'uf'], dtype='object')

```