尽管我得到了正确的图表(是的!),但每次运行 ggplot 时我也会收到此警告:
FutureWarning: Attribute 'is_copy' is deprecated and will be removed in a future version.return object.__setattr__(self, name, value)
我使用 Python 3.6 并且:
from plotnine import * #Vers. 0.3.0
import pandas as pd #Vers. 0.23.1
from pandas import DataFrame
ggplot代码是:
g = ggplot(df, aes(x='date', y='meanDN')) + geom_point()
print(g)
我应该担心吗?
请您参考如下方法:
警告来自对 pandas 库的调用。 plotnine 仍然使用 pandas 的一项功能,该功能已被弃用,并将在未来的版本中删除。
Plotnine正在积极开发中,这个bug已经fixed already .
plotnine 0.3.0 之后还没有新版本,所以你必须从 GitHub 安装开发版本或等待新版本才能使警告消失。
