Seaborn distplot Deprecated: Migrate to displot or histplot
This warning message indicates that the 'distplot' function in Seaborn is deprecated and will be removed in future versions of Seaborn. You should use either 'displot' or 'histplot' instead.
In the code snippet 'sns.distplot(data['LSTAT'], bins=20, kde=True)', 'distplot' creates a histogram of the 'LSTAT' column in the 'data' dataframe, using 20 bins and a kernel density estimate.
To update your code, replace 'distplot' with either 'displot' or 'histplot':
Using 'displot':
sns.displot(data['LSTAT'], bins=20, kde=True)
Using 'histplot':
sns.histplot(data['LSTAT'], bins=20, kde=True)
Refer to the guide linked in the warning message for detailed information on how to use the new functions: https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751
原文地址: https://www.cveoy.top/t/topic/oHoA 著作权归作者所有。请勿转载和采集!