Below is the seaborn heatmap generated from a MultiIndex dataframe:
import numpy as np
import pandas as pd
import seaborn as sns
years = range(2016,2019)
months = range(1,6)
df = pd.DataFrame(index=pd.MultiIndex.from_product([years,months]))
df['vals'] = np.random.random(size=len(df))
sns.heatmap(df)
The above heatmap's yticks show both years and months. Is there a way to change the heatmap's yticks to only show the years, like below?


