模块“seaborn”没有属性“relplot”

2024-04-29 03:49:36 发布

您现在位置:Python中文网/ 问答频道 /正文

我在colab笔记本中运行relplot函数时遇到问题,但在jupyter笔记本中运行得很好。

在colab中得到以下错误


AttributeError Traceback (most recent call last) in () ----> 1 sns.relplot(x="total_bill", y="tip", 2 col="time", # Categorical variables that will determine the faceting of the grid. 3 hue="smoker", # Grouping variable that will produce elements with different colors. 4 style="smoker", # Grouping variable that will produce elements with different styles. 5 size="size", # Grouping variable that will produce elements with different sizes.

AttributeError: module 'seaborn' has no attribute 'relplot'


Tags: thesizethatwith笔记本elementsvariablewill