Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is pandas.tools

After installing 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$  

I try to load 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' 

How do I access pandas.tools?

like image 795
Ivan Avatar asked Feb 01 '19 04:02

Ivan


People also ask

Where does Python install pandas?

Enter the command “pip install pandas” on the terminal. This should launch the pip installer. The required files will be downloaded, and Pandas will be ready to run on your computer. After the installation is complete, you will be able to use Pandas in your Python programs.

How do I know if I have pandas installed or not?

1. Check pandas Version from Command or Shell mode. From a command line or shell run the pip list command to check the pandas version or get the list of the package installed with the currently installed version next to the package. If you don't have pandas installed then this command doesn't list it.

Is pandas installed with Anaconda?

Pandas 1.0 is available now, and can be installed via Anaconda with the simple command conda install pandas.


1 Answers

Package pandas.tools.plotting was moved to pandas.plotting in this commit, as part of #16005 and #12548 in Pandas 0.20.0.

More recently, in this commit in Pandas #23376 released in Pandas 0.24.0, the deprecated pandas.tools package, which was previously allowing pandas.tools.plotting to keep working, was removed.

Ergo, once you allow Pandas to upgrade to 0.24.0 or later, you will need to replace imports from pandas.tools.plotting to be instead from pandas.plotting.

like image 101
javabrett Avatar answered Sep 28 '22 05:09

javabrett