clustergrammer2-test-notebooks

by cornhundred

notebooks/Test-1.ipynb

import numpy as np
import pandas as pd

# generate random matrix
num_rows = 500
num_cols = 10
np.random.seed(seed=100)
mat = np.random.rand(num_rows, num_cols)

# make row and col labels
rows = range(num_rows)
cols = range(num_cols)
rows = [str(i) for i in rows]
cols = [str(i) for i in cols]

# make dataframe 
df = pd.DataFrame(data=mat, columns=cols, index=rows)
from clustergrammer2 import net
>> clustergrammer2 backend version 0.4.0
net.load_df(df)
net.widget()