How to create correlation matrix but with only part of the rows?
You can use a slice of the correlation matrix dataframe.

import pandas as pd
import seaborn as sns

df = pd.DataFrame({'A':[0,1,2,3,],'B':[4,5,6,7],'C':[8,9,10,11]})
sns.heatmap(df.iloc[2:3, 1:3], annot=True, cmap=sns.diverging_palette(220, 10, as_cmap=True),square=True, )