web-dev-qa-db-ja.com

pandas.toolsはどこにありますか

pandasをインストールした後:

idf:~/Documents/python/plot$ pip3 install pandas --user
Collecting pandas
  Using cached https://files.pythonhosted.org/packages/f9/e1/4a63ed31e1b1362d40ce845a5735c717a959bda992669468dae3420af2cd/pandas-0.24.0-cp36-cp36m-manylinux1_x86_64.whl
Requirement already satisfied: numpy>=1.12.0 in /home/idf/.local/lib/python3.6/site-packages (from pandas) (1.15.4)
Requirement already satisfied: pytz>=2011k in /home/idf/.local/lib/python3.6/site-packages (from pandas) (2018.7)
Requirement already satisfied: python-dateutil>=2.5.0 in /home/idf/.local/lib/python3.6/site-packages (from pandas) (2.7.5)
Requirement already satisfied: six>=1.5 in /home/idf/.local/lib/python3.6/site-packages (from python-dateutil>=2.5.0->pandas) (1.12.0)
zipline 1.3.0 has requirement pandas<=0.22,>=0.18.1, but you'll have pandas 0.24.0 which is incompatible.
Installing collected packages: pandas
Successfully installed pandas-0.24.0
idf:~/Documents/python/plot$ 

pandas.toolsを読み込もうとしています。

from pandas.tools.plotting import autocorrelation_plot

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-52-e11ce94b8d5d> in <module>
----> 1 from pandas.tools.plotting import autocorrelation_plot


ModuleNotFoundError: No module named 'pandas.tools'

pandas.toolsにアクセスするにはどうすればよいですか?

15
Ivan
Traceback (most recent call last):
  File "brod.py", line 3, in <module>
    from pandas.tools.plotting import scatter_matrix
ModuleNotFoundError: No module named 'pandas.tools'

これは新しいバージョンのパンダで発生します。この

from pandas.tools.plotting import scatter_matrix

古いバージョンの場合pandas新しいバージョンを使用している場合pandasその後、コードを記述します

from pandas.plotting import scatter_matrix

の代わりに

from pandas.tools.plotting import scatter_matrix
1
Alan Jose Tom

Pandas.tools.plottingの代わりにpandas.plottingを使用します

0
Sivaji Siva