小提琴图 ValueError: object arrays are not supported

绘制小提琴图时,出现 ValueError: object arrays are not supported 错误。

在修改了传入的 DataFrame 数据时,将传入要进行绘制的数据进行转换为整数,即可解决此错误。

示例:
df['values'] = df['values'].astype('int64')

 

posted @ 2021-09-26 14:22  CodeYaSuo  阅读(1047)  评论(0编辑  收藏  举报