在学习Python的seaborn图形绘制的时候,遇到了以下报错信息:

UserWarning:

`distplot` is a deprecated function and will be removed in seaborn v0.14.0.

Please adapt your code to use either `displot` (a figure-level function with

similar flexibility) or `histplot` (an axes-level function for histograms).

For a guide to updating your code to use the new functions, please see

https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751

sns.distplot(d,kde=False,color='b')

大概意思是:distplot是已弃用的函数,将在v0.14.0版本中移除。 请修改您的代码以使用“ displot”(具有类似灵活性的图形级函数)或“ histplot”(直方图的轴级函数)

并且给了一个网址让我们去了解新版本:

https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751

其他地方搜查了一通,都是distplot的解释,没有displot的,估计语法格式是一样的,改了之后就恢复了。

所以初步怀疑是pycharm的版本内置问题导致的。

另一个解决方案:降低版本

打开“文件”——“设置”

 现在的版本是0.12.1

双击进去,右边调整版本,降低版本号也可以解决

参考阅读

评论可见,请评论后查看内容,谢谢!!!
 您阅读本篇文章共花了: