First time here? Check out the Help page!

Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
0

How can I use Pandas in a derived class of EnergyPlusPlugin

asked 3 years ago

S.Wang's avatar

updated 3 years ago

I import pandas on top of my .py file, and run the simulation. The error says that 'No module named pandas'.

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
3

answered 3 years ago

S.Wang's avatar

Problem solved.

The directory of Pandas needs to be added to the search path object in the IDF file.

Otherwise, energy-plus won't know where to find it.

Preview: (hide)
link

Comments

This helps a lot.

Fan's avatar Fan  ( 2 years ago )
1

answered 3 years ago

santoshphilip's avatar

updated 3 years ago

Python comes with a number of built in packages such as "datetime" and "csv"

If you do:

import datetime
import csv

it will work with no issues.

Pandas is not a built-in python package. This means that you need to install it. Generally you can install it with:

pip install pandas

Read more on pandas installation at https://pandas.pydata.org/pandas-docs...

Once pandas is is installed your code should work.

if you are starting to install external packages, you may want to read about virtualenv https://docs.python.org/3/library/ven...

Preview: (hide)
link

Comments

Thank you very much!

I actually have installed pandas and have managed to use it in some other python scripts.

But in the plug-in instance I wrote, energyplus cannot find it.

S.Wang's avatar S.Wang  ( 3 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 3 years ago

Seen: 376 times

Last updated: Mar 09 '22