我有数据帧df:
Timestamp-start datetime64[ns] Timestamp-end datetime64[ns] M object S object Type object description_x object description_y object Date datetime64[ns] number_col float64 dtype: object
编号\u列:
51 0.0
0 1.0
1 2.0
2 3.0
52 5.0
...
47 148.0
48 148.0
43 148.0
49 149.0
50 149.0
Name: number_col, Length: 132, dtype: float64
我想用seaborn和columnnumber\u col
> import seaborn as sns
>
> sns.distplot(df, x='number_col')
但我犯了以下错误:
ValueError: could not convert string to float: 'number_col'
我不知道为什么会发生这种情况,“number_col”已经是一个浮点列了
^{} 不需要系列、1d数组或列表作为第一个参数,不是完整的
pandas.DataFrame
,请尝试替换使用
在{a2}中,{}的单列被{}称为系列
我发现^{} 不受欢迎。相反,我们应该使用^{}
在^{} 的第一个参数中,我们可以把
pandas.DataFrame
放在:相关问题 更多 >
编程相关推荐