Member-only story

Pandas Dataframe Visualization with Plotly via Cufflinks in Jupyter Lab Issues

Craig Chen
2 min readAug 4, 2018

--

It’s no doubt that Pandas is one of the most popular data analysis package in Python. Lots of people use Pandas to import data into Python and do some data exploratory analysis. One of the best way to do EDA is to visualize the data. In terms of visualization, Pandas has it’s own build-in plot function. However, although it has some useful plot options, it’s not enough for Data Scientist/Analyst to create intrigued graphs. Therefore, there are some useful packages come out to solve this problem — Plotly and Cufflinks.

image source

Plotly is a powerful Python visualization package.

Cufflink is an incredible package to binds Plotly directly to Pandas Dataframe

If you’re interested in these two packages, you can go to their websites to see the demo. Now, I am writing down several problems that I faced when I was building the cufflink in Python.

Update (2018.10.11):

cufflinks now support plotly 3.0 even 3.3 with 0.14.5 realease. You can install it using following

pip install git+git://github.com/santosjorge/cufflinks.git#egg=cufflinks -U

Thanks for Ozan!

Issues (2018.8.4) :

1. Cufflinks doesn’t support Plotly 3.x

The error message would like this:

The 'bgcolor' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A named CSS color:

This is because Cufflinks now only supports Plotly 2.x version. Use the following command to install 2.7 version. (ps. If you pip3 install plotly directly, you will install 3.x version)

pip3 install plotly==2.7.0

source: https://github.com/santosjorge/cufflinks/issues/119

2. The output is Blank in Jupyter notebook

--

--

Craig Chen
Craig Chen

Written by Craig Chen

Quantitative Analyst / Data Scientist

Responses (1)

Write a response