ModuleNotFoundError: No module named 'pandas'

Ads
 

ModuleNotFoundError: No module named 'pandas'

Hi,

I have been assigned work on python pandas and there is already written code. Which throws following error:

ModuleNotFoundError: No module named 'pandas'

More details about the error:

Traceback (most recent call last):
  File "1.py", line 36, in <module>
    import pandas as pd
ModuleNotFoundError: No module named 'pandas'

What is this error and how to get rid of it?

Thanks

View Answers

January 19, 2019 at 10:02 PM

HI,

Pandas is python library which can read data from may different data source like a CSV or TSV file, or a SQL database etc.. It then converts data into pandas data frames.

In your case error is coming because pandas is not installed with your python distribution.

You can install pandas python with following command:

pip install pandas

Before writing answer here I tested the installing and pandas was successfully install with above command.

Here is my installation log:

(tf12) [email protected]:~/textgeneration$ pip install pandas
Collecting pandas
  Downloading https://files.pythonhosted.org/packages/e1/d8/feeb346d41f181e83fba45224ab14a8d8af019b48af742e047f3845d8cff/pandas-0.23.4-cp36-cp36m-manylinux1_x86_64.whl (8.9MB)
    100% | 8.9MB 683kB/s 
Requirement already satisfied: numpy>=1.9.0 in /home/deepak/anaconda3/envs/tf12/lib/python3.6/site-packages (from pandas) (1.16.0)
Requirement already satisfied: python-dateutil>=2.5.0 in /home/deepak/anaconda3/envs/tf12/lib/python3.6/site-packages (from pandas) (2.7.5)
Collecting pytz>=2011k (from pandas)
  Downloading https://files.pythonhosted.org/packages/61/28/1d3920e4d1d50b19bc5d24398a7cd85cc7b9a75a490570d5a30c57622d34/pytz-2018.9-py2.py3-none-any.whl (510kB)
    100% | 512kB 1.3MB/s 
Requirement already satisfied: six>=1.5 in /home/deepak/anaconda3/envs/tf12/lib/python3.6/site-packages (from python-dateutil>=2.5.0->pandas) (1.12.0)
Installing collected packages: pytz, pandas
Successfully installed pandas-0.23.4 pytz-2018.9
(tf12) [email protected]:~/textgeneration$

Thanks

Ads









Related Tutorials/Questions & Answers:
ImportError: No module named scipy.ndimage - Solved
ImportError: No module named scipy.ndimage - Solved  Hi, How to solve following error: ImportError: No module named scipy.ndimage This error..., in <module> import scipy.ndimage as ndi ImportError: No module named
Hibernate named queries
Hibernate named queries  Hi, What is named queries in Hibernate? Thanks
Advertisements
a class named Transactions
a class named Transactions  Write this java code for me: a class named Transactions that holds the memo and the amount of a transaction. Prompt the user for the number of transactions and create a new Transaction object
Design a class named account
Design a class named account  The class contains: § An int data field named id for the account (default 0). § A double data field named balance for the account (default 0.0) § A double data field named annualInterestRate
Database named studentinfo
Database named studentinfo  1.create design of studentinfo using swing component 2.Create a database named student info. 3.create a table that stores all the details from the form,application of basic Normalization is required
Database named studentinfo
Database named studentinfo  1.create design of studentinfo using swing component 2.Create a database named student info. 3.create a table that stores all the details from the form,application of basic Normalization is required
Database named studentinfo
Database named studentinfo  1.create design of studentinfo using swing component 2.Create a database named student info. 3.create a table that stores all the details from the form,application of basic Normalization is required
Named ? SQL query in hibernate
Named ? SQL query in hibernate  What is Named SQL query in hibernate?   You can put all the HQL into the XML mapping file rather than putting the sql queries to various places in between code. sample.hbm.xml <
Hibernate Named Query
This section contain description of named query with example
create named class - Java Beginners
create named class  Can you check my [email protected]: How to create a class named Employee with name and salary. Make a class Manager inherit from Employee with an instance field named department. Supply a method toString
Hibernate Named Native SQL Query
In this section, you will learn Named Native SQL Query in Hibernate
JPA setParameter (Named Parameter)
JPA setParameter (Named Parameter)   ... API's method setParameter as a named parameter. JPA Query API's supports two types of setParameter.  1. Named Parameters  2. Numbered Parameters
Hibernate Named HQL in Annotation
In this section, you will learn how to execute Named HQL written in Model class Annotation
Admin Module
Admin Module The admin have the privilege  to add the question, delete the question. He is responsible for maintaining the site. He can also search the question paper by question Id and by title. The Admin does the following
Version of com.fmpwizard>lift-named-comet_2.8.2 dependency
List of Version of com.fmpwizard>lift-named-comet_2.8.2 dependency
Version of com.fmpwizard>lift-named-comet_2.8.1 dependency
List of Version of com.fmpwizard>lift-named-comet_2.8.1 dependency
Version of com.fmpwizard>lift-named-comet_2.9.0-1 dependency
List of Version of com.fmpwizard>lift-named-comet_2.9.0-1 dependency
Version of com.fmpwizard>lift-named-comet_2.9.1 dependency
List of Version of com.fmpwizard>lift-named-comet_2.9.1 dependency
User Module
User Module The user first need to make registration on the website for appearing in the online examination. After the making successful registration he is eligible for online test examination. To appear in the examination he need
spring JEE module tutorial
spring JEE module tutorial  Hi, I want spring Jee module tutorial and spring ORM module tutorial plz send me
named parameters vs postional parameters - Hibernate
named parameters vs postional parameters  hi,Can you please explain why we i should go for particular parameters or positional parameter... regards, somasekhar
Hibernate Named HQL using XML Mapping
In this section, you will learn executing Named HQL written in XML Mapping file
JPA Named Parameter List
JPA Named Parameter List   ... application using JPA Named Parameter List. This is similar as named parameter but here we use the an array list as named parameter.  Named Parameter List
JPA Named Parameter
JPA Named Parameter       In this section, you will learn how to use JPA Named Parameter in your jpa application. In JPA named parameter is used where you assign names
Hibernate Named Native SQL in Annotation
In this section, you will learn how to execute the Named Native SQL written in Model class Annotation
JPA Named Queries
JPA Named Queries       In this section, you will know about the JPA Named Queries...;) }) For developing JPA Named Queries, you need the following files
spring DAO module turorial
spring DAO module turorial  how to integrate springDAO and spring webMVC
exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'transactionManager' is defined
exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'transactionManager' is defined  Hi, In my web... is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'transactionManager' is defined
Write a program named InternetCharge_YourLastName that do the following:
Write a program named InternetCharge_YourLastName that do the following: ... per month unlimited access is provided. Write a program named InternetCharge.... Instruction: We should have two classes class named InternetService
Hibernate Named Query
Hibernate Named Query       Named Query is very useful concept in hibernate. It lets...;   Calling Named Query in the coding section You can call
Maven Dependency lift-named-comet_2.8.1 >> 0.3
You should include the dependency code given in this page to add Maven Dependency of com.fmpwizard >> lift-named-comet_2.8.1 version0.3 in your project

Ads