naveen
naveen

Reputation: 93

how to import pandas in ipython notebook on ubuntu

I am trying to import pandas in ipython notebook but that time getting below error:

In [2]: import pandas as pd


ImportError Traceback (most recent call last) in () ----> 1 import pandas as pd

ImportError: No module named 'pandas'

Upvotes: 0

Views: 3850

Answers (1)

Vatsal Shah
Vatsal Shah

Reputation: 11

Okay this is most definitely an error which appears when you don't have a particular module installed in your Ipython Environment. In your case, it is the 'pandas' module you are trying to import:

import pandas as pd

This won't work before you have your pandas module installed in your development environment.

You can learn how to install pandas from their official website : http://pandas.pydata.org/.

Best way to get pandas is to install via conda Builds for osx-64,linux-64,linux-32,win-64,win-32 for Python 2.7, Python 3.4, and Python 3.5 are all available.

conda install pandas

The above command will work only if you are working with the conda environment.

You can also install pandas using the pip module. Type :

pip install pandas
import pandas as pd

This should most definitely solve your problem. Detailed installation instructions can be found on : http://pandas.pydata.org/pandas-docs/stable/install.html

Upvotes: 1

Related Questions