I have a big dataframe with values between -1 and 1. The dataframe has almost 7000 lines and 3 columns. I would like to have a visualization without the cells shrinking. For now, it's more lines than cells. I would like the color to refer to the value. I was trying with
The most compact representation would be to use a bitmap of one pixel per value. This can be accomplished using PIL or Pillow, by creating the image from a buffer of data.
import StringIO from PIL import Image im = Image.open(StringIO.StringIO(buffer))
You would have to scale the data in the buffer to one or more bytes per pixel depending on the mode of the image you want to create