How to use IBM python module "pixiedust" in Google Colaboratory?

796 Views Asked by At

I was fascinated by the debugging and visualization library pixiedust developed by IBM and wanted to try it on gooogle colab.

I did following:

!pip install pixiedust

# matplotlib, seaborn, jinja2 are already installed in gcolab.

Display chart does not work

import pixiedust
df = pixiedust.sampleData() # this shows the dataframe
display(df)  # This does not do anything.

Debugging also does not work

import pixiedust

# Next cell
%%pixie_debugger
import random
def find_max (values):
    max = 0
    for val in values:
        if val > max:
            max = val
    return max
find_max(random.sample(range(100), 10))

# This gives nothing.

Is it possible to use pixiedust in Google Colab or it is only availabe in IMB clouds?

1

There are 1 best solutions below

2
On

maybe its a bit late for @astro123, but perhaps someone else is also looking as I was. So here its my solution. As noted in the pixiedust install guidelines, at https://pixiedust.github.io/pixiedust/install.html you have to check you have a jupyter kernel with pixiedust. In colab just run

!jupyter pixiedust list

As you can see it does not have by default a kernel with pixiedust, just so install it by

 `   !jupyter pixiedust install`

Then you can select on the main panel to run with the pixiedust kernel. It should work now, but as collab is constantly evolving there is no a simple walkthrough.

Regards