Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clustergrammer2 error: 'DataFrame' object has no attribute 'ix' #98

Open
zzzbobml opened this issue Jul 15, 2021 · 2 comments
Open

Clustergrammer2 error: 'DataFrame' object has no attribute 'ix' #98

zzzbobml opened this issue Jul 15, 2021 · 2 comments

Comments

@zzzbobml
Copy link

I installed Clustergrammer2 but I'm getting the following error

import pandas as pd
from clustergrammer_widget import *
net = Network(clustergrammer_widget)
import numpy as np

data = pd.DataFrame(np.random.randn(100, 100))
net.load_df(data)
net.cluster()
net.widget()
~/opt/anaconda3/envs/myenv/lib/python3.6/site-packages/pandas/core/generic.py in __getattr__(self, name)
   5139             if self._info_axis._can_hold_identifiers_and_holds_name(name):
   5140                 return self[name]
-> 5141             return object.__getattribute__(self, name)
   5142 
   5143     def __setattr__(self, name: str, value) -> None:

AttributeError: 'DataFrame' object has no attribute 'ix'
@cornhundred
Copy link
Contributor

Hi @zzzbobml I think you may have installed an older version. You can follow the steps in this notebook to install, but you can use the widget instead of Observable embed (which is only needed because Google Colab does not support custom Widgets) https://colab.research.google.com/drive/13zIa3QumWdhX9lABXgoV1v9PVVutfFDz#scrollTo=1Tt0PGi8v-2N

@zzzbobml
Copy link
Author

zzzbobml commented Jul 16, 2021

@cornhundred
I followed the instructions from the documentation

pip install clustergrammer2
jupyter nbextension install --py --sys-prefix clustergrammer2
jupyter nbextension enable --py --sys-prefix clustergrammer2

unfortunately, I cannot install from jupyter as I am not super user. Are the two commands above correct?

Here is the result of pip list

% pip list | grep -F clustergrammer
clustergrammer-widget          1.13.3
clustergrammer2                0.17.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants