绘制阵列的累积分布

时间:2019-09-25 19:43:20

标签: python pandas countvectorizer

我正在尝试绘制数组的cdf,但始终遇到此错误消息:

  

ValueError:太多值无法解包(预期2)

这是我编写的代码:

import seaborn as sns
vect = CountVectorizer(min_df=5)
tf = vect.fit_transform(file.quotes)
a = tf.toarray()
sns.kdeplot(a,cumulative=True)

以下是我的数据示例:

array([[0, 3, 0, 1, 1, 0, 0, 0],
       [0, 0, 0, 2, 3, 0, 1, 0],
       [4, 0, 0, 3, 4, 0, 2, 0],
       [4, 3, 1, 2, 4, 2, 1, 1]])

0 个答案:

没有答案
相关问题