title: Pandas color map
body: <p>I tried to do sequential colormap on pandas. This is my outcome and I want to do colormap.</p>
  
  <pre><code>      A     G     C     T    -
  A     -  5823  1997  1248  962
  G  9577     -  2683  2492  788
  C  2404  2574     -  9569  722
  T  1272  1822  5931     -  767
  -   795   583   599   559    -
  
  
  
  df = pd.DataFrame(index= ["A", "G", "C", "T", "-"], columns=["A", "G", "C", "T", "-"])
  import matplotlib.pyplot as plt
  import numpy as np
  column_labels = list("AGCT-")
  row_labels = list("AGCT-")
  data = df
  fig, ax = plt.subplots()
  heatmap = ax.pcolor(data, cmap=plt.cm.Blues)
  
  ax.set_xticks(np.arange(data.shape[0])+0.5, minor=False)
  ax.set_yticks(np.arange(data.shape[1])+0.5, minor=False)
  
  ax.invert_yaxis()
  ax.xaxis.tick_top()
  
  ax.set_xticklabels(row_labels, minor=False)
  ax.set_yticklabels(column_labels, minor=False)
  plt.show()
  </code></pre>
  
  <p>But it keeps giving an error.</p>
  
  <pre><code> File "//anaconda/lib/python2.7/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 685, in runfile
      execfile(filename, namespace)
  
    File "//anaconda/lib/python2.7/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 78, in execfile
      builtins.execfile(filename, *where)
  
    File "/Users/macbookpro/Desktop/mutations/first.py", line 115, in &lt;module&gt;
      heatmap = ax.pcolor(data, cmap=plt.cm.Blues)
  
    File "//anaconda/lib/python2.7/site-packages/matplotlib/axes/_axes.py", line 4967, in pcolor
      collection.autoscale_None()
  
    File "//anaconda/lib/python2.7/site-packages/matplotlib/cm.py", line 335, in autoscale_None
      self.norm.autoscale_None(self._A)
  
    File "//anaconda/lib/python2.7/site-packages/matplotlib/colors.py", line 956, in autoscale_None
      self.vmax = ma.max(A)
  
    File "//anaconda/lib/python2.7/site-packages/numpy/ma/core.py", line 6036, in max
      return asanyarray(obj).max(axis=axis, fill_value=fill_value, out=out)
  
    File "//anaconda/lib/python2.7/site-packages/numpy/ma/core.py", line 5280, in max
      result = self.filled(fill_value).max(axis=axis, out=out).view(type(self))
  
  AttributeError: 'str' object has no attribute 'view'
  </code></pre>