code: def heatmap(df, inline=False,
              filter=None, n=0, p=0, sort=None,
              figsize=(20, 12), fontsize=16, labels=True, 
              cmap='RdBu', vmin=-1, vmax=1, cbar=True
              ):
      df = nullity_filter(df, filter=filter, n=n, p=p)
      df = nullity_sort(df, sort=sort)
      plt.figure(figsize=figsize)
      gs = gridspec.GridSpec(1, 1)
      ax0 = plt.subplot(gs[0])
      df = df.iloc[:,[i for i, n in enumerate(np.var(df.isnull(), axis='rows')) if n > 0]]
      corr_mat = df.isnull().corr()
      mask = np.zeros_like(corr_mat)
      mask[np.triu_indices_from(mask)] = True
      if labels:
          sns.heatmap(corr_mat, mask=mask, cmap=cmap, ax=ax0, cbar=cbar,
                      annot=True, annot_kws={'size': fontsize - 2},
                      vmin=vmin, vmax=vmax)
      else:
          sns.heatmap(corr_mat, mask=mask, cmap=cmap, ax=ax0, cbar=cbar,
                      vmin=vmin, vmax=vmax)
      ax0.xaxis.tick_bottom()
      ax0.set_xticklabels(ax0.xaxis.get_majorticklabels(), rotation=45, ha='right', fontsize=fontsize)
      ax0.set_yticklabels(ax0.yaxis.get_majorticklabels(), fontsize=fontsize, rotation=0)
      ax0.set_yticklabels(ax0.yaxis.get_majorticklabels(), rotation=0, fontsize=fontsize)
      ax0.xaxis.set_ticks_position('none')
      ax0.yaxis.set_ticks_position('none')
      ax0.patch.set_visible(False)
      for text in ax0.texts:
          t = float(text.get_text())
          if 0.95 <= t < 1:
              text.set_text('<1')
          elif -1 < t <= -0.95:
              text.set_text('>-1')
          elif t == 1:
              text.set_text('1')
          elif t == -1:
              text.set_text('-1')
          elif -0.05 < t < 0.05:
              text.set_text('')
          else:
              text.set_text(round(t, 1))
      if inline:
          plt.show()
      else:
          return ax0