标签:color har pandas 密钥 port layout update href csv
第一步:申请密钥
https://plot.ly/#/ 注册一个账号,第一次需要生成密钥
第二步:
import pandas as pd import chart_studio.plotly as py import plotly.figure_factory as ff import numpy as np data = pd.read_csv(‘E:\\result.csv‘,nrows =500,encoding=‘gbk‘) X = data[["类别"]] fig = ff.create_dendrogram(X, orientation=‘left‘,labels=list(data["名称"])) fig[‘layout‘].update({‘width‘:800, ‘height‘:1500}) py.plot(fig, filename=‘dendrogram_with_labels‘)
运行结果:
这个图的看法:从右往左依次画竖线分成多个部分
标签:color har pandas 密钥 port layout update href csv
原文地址:https://www.cnblogs.com/zmh-980509/p/12547713.html