【发布时间】:2021-01-15 16:45:01
【问题描述】:
我想绘制一个 seaborn regplot。 我的代码:
x=data['Healthy life expectancy']
y=data['max_dead']
sns.regplot(x,y)
plt.show()
但是,这会给我未来的警告错误。如何解决此警告?
FutureWarning: Pass the following variables as keyword args: x, y. From version 0.12, the only valid
positional argument will be 'data', and passing other arguments without an explicit keyword will
result in an error or misinterpretation.
【问题讨论】:
-
接受的答案适用于任何有此问题的seaborn plots。不要为每种情节添加单独的答案,它将被删除为duplicate,其中已经有happened。
-
FutureWarning: Pass the following variable as a keyword arg: x也包含在此答案中。