from ggplot import *
import pandas as pd
y_name = 'y'
df = pd.DataFrame({"x":[1,2,3,4],y_name:[4,5,6,7]})
p =ggplot(df, aes(x='x', y='y'))+geom_point()
然后我的PyCharm崩溃了,没有照片,我必须重新启动python consol。但是这段代码可以在spyder中使用。
我也这样做:
from ggplot import *
在PyCharm
中,它警告我:
from ggplot import *
Backend Qt5Agg is interactive backend. Turning interactive mode on.
C:\Anaconda3\lib\site-packages\ggplot\utils.py:81: FutureWarning: pandas.tslib is deprecated and will be removed in a future version.
You can access Timestamp as pandas.Timestamp
pd.tslib.Timestamp,
C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py:20: FutureWarning: The pandas.lib module is deprecated and will be removed in a future version. These are private functions and can be accessed from pandas._libs.lib instead
module = self._system_import(name, *args, **kwargs)
C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py:20: FutureWarning: The pandas.core.datetools module is deprecated and will be removed in a future version. Please use the pandas.tseries module instead.
module = self._system_import(name, *args, **kwargs)
这不会在间谍中显示。