我在 Anaconda 上运行 python 3.6.1。 每当我尝试使用 seaborn 绘图时,我都会收到以下警告。
C:\Anaconda3\lib\site-packages\seaborn\categorical.py:1428: FutureWarning: remove_na is deprecated and is a private function. Do not use.
stat_data = remove_na(group_data)
即使我尝试使用下面页面上发布的条形图示例, https://seaborn.pydata.org/generated/seaborn.barplot.html
我仍然得到相同的结果。
提前致谢。
我简化了代码。但是结果也是一样
[这与 https://seaborn.pydata.org/generated/seaborn.barplot.html 中的代码相同]
import seaborn as sns
sns.set_style("whitegrid")
tips = sns.load_dataset("tips")
sns.barplot(x="day", y="total_bill", data=tips)
请您参考如下方法:
此问题已于 2017 年 8 月修复。它是由 Seaborn 调用 Pandas 中的私有(private)函数引发的。
参见 Pandas ticket和 Seaborn ticket .更新您的 Seaborn,此警告应该会消失。
