title: highlight a row in seaborn heatmap
body: <p>Today I'm working on a heatmap inside a function. It's nothing too fancy: the heatmap shows a value for every district in my city and inside the function one of the arguments is <code>district_name</code>.</p>
  
  <p><a href="https://i.stack.imgur.com/HiTJW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HiTJW.png" alt="heatmap"></a></p>
  
  <p>I want my function to print this same heatmap, but that it highlights the selected district (preferably through bolded text).</p>
  
  <p>My code is something like this:</p>
  
  <pre><code>def print_heatmap(district_name, df2):
      df2=df2[df2.t==7]
      pivot=pd.pivot_table(df2,values='return',index= 'district',columns= 't',aggfunc ='mean')
  
      sns.heatmap(pivot, annot=True, cmap=sns.cm.rocket_r,fmt='.2%',annot_kws={"size": 10})
  </code></pre>
  
  <p>So I need to access ax's values, so I can bold, say "Macul" if I enter <code>print_heatmap('Macul',df2)</code>. Is there any way I can do this?</p>
  
  <p>What I tried was to use <code>mathtext</code> but for some reason I can't use bolding in this case:</p>
  
  <pre><code>pivot.index=pivot.index.str.replace(district_name,r"$\bf{{{}}}$".format(district_name)
  </code></pre>
  
  <p>But that brings:</p>
  
  <pre><code>ValueError: 
  f{macul}$
  ^
  Expected end of text (at char 0), (line:1, col:1)
  </code></pre>
  
  <p>Thanks</p>