Python Seaborn绘图值错误

Python Seaborn绘图值错误,python,pandas,seaborn,Python,Pandas,Seaborn,我有一个熊猫数据帧df,我正在尝试使用seaborn库创建一个小提琴图 rank sentiment category 0 1 0.657413 m 1 2 0.895769 m 2 3 -0.435457 m 3 4 -0.717959 m 4 5 0.869688 m 这是seaborn线: sns.violinplot(x="rank", y="seni

我有一个熊猫数据帧
df
,我正在尝试使用seaborn库创建一个小提琴图

    rank  sentiment category
0     1   0.657413        m
1     2   0.895769        m
2     3  -0.435457        m
3     4  -0.717959        m
4     5   0.869688        m
这是seaborn线:

sns.violinplot(x="rank", y="senitment", hue="category", data=df)
我一直收到这个
ValueError

ValueError: Could not interpret input 'senitment'
完全回溯

/violinplot中的Users/jrs/anaconda/lib/python3.5/site-packages/seaborn/category.py 2299 bw,切割,缩放,缩放色调,网格大小, 2300宽度、内部、拆分、方向、线宽、, ->2301颜色、调色板、饱和度) 2302 2303如果ax为无:

/Users/jrs/anaconda/lib/python3.5/site-packages/seaborn/categorical.py in __init__(self, x, y, hue, data, order, hue_order, bw, cut, scale, scale_hue, gridsize, width, inner, split, orient, linewidth, color, palette, saturation)
    535                  color, palette, saturation):
    536 
--> 537         self.establish_variables(x, y, hue, data, orient, order, hue_order)
    538         self.establish_colors(color, palette, saturation)
    539         self.estimate_densities(bw, cut, scale, scale_hue, gridsize)

/Users/jrs/anaconda/lib/python3.5/site-packages/seaborn/categorical.py in establish_variables(self, x, y, hue, data, orient, order, hue_order, units)
    145                 if isinstance(input, string_types):
    146                     err = "Could not interpret input '{}'".format(input)
--> 147                     raise ValueError(err)
    148 
    149             # Figure out the plotting orientation

ValueError: Could not interpret input 'senitment'

我尝试在df上使用.reset_index()并更改数据类型,但没有成功。思想?

在你的sns中输入“情绪”。维奥林绘图行亲爱的上帝。非常感谢。午睡时间。有时我们都需要一双额外的眼睛。。。然而,在这样的情况下,你有成千上万的眼睛。:)晚安!
sns.violinplot(x="rank", y="sentiment", hue="category", data=df)