Code Monkey home page Code Monkey logo

Comments (12)

santoshphilip avatar santoshphilip commented on September 2, 2024

Can you send me:

  • the html file
  • the code snippet that gave the error

use gist to post those files (see the gist link above). Post links to the files you have put on gist.

note: unfortunately github issues does not allow the attachment of files (except image files). Using gist is a workaround,

from eppy.

santoshphilip avatar santoshphilip commented on September 2, 2024

Regarding taking the table data to numpy or pandas, can you open a new issue for this ?
I'll probably assign it to a contributor familiar with pandas.

I assume you will help in updating the documentation when the code is ready ?
(I am not kidding here :-)

from eppy.

jamiebull1 avatar jamiebull1 commented on September 2, 2024

I'm reasonably familiar with pandas and would be happy to help out on that
aspect if we have a new issue opened.

On Wed, Dec 17, 2014, 01:23 santoshphilip [email protected] wrote:

Regarding taking the table data to numpy or pandas, can you open a new
issue for this ?
I'll probably assign it to a contributor familiar with pandas.

I assume you will help in updating the documentation when the code is
ready ?
(I am not kidding here :-)


Reply to this email directly or view it on GitHub
#36 (comment).

from eppy.

amaliahicks avatar amaliahicks commented on September 2, 2024

Fantastic, thanks!. New issue coming...

On Wednesday, December 17, 2014, Jamie Bull [email protected]
wrote:

I'm reasonably familiar with pandas and would be happy to help out on that
aspect if we have a new issue opened.

On Wed, Dec 17, 2014, 01:23 santoshphilip <[email protected]
javascript:_e(%7B%7D,'cvml','[email protected]');> wrote:

Regarding taking the table data to numpy or pandas, can you open a new
issue for this ?
I'll probably assign it to a contributor familiar with pandas.

I assume you will help in updating the documentation when the code is
ready ?
(I am not kidding here :-)


Reply to this email directly or view it on GitHub
#36 (comment).


Reply to this email directly or view it on GitHub
#36 (comment).

from eppy.

amaliahicks avatar amaliahicks commented on September 2, 2024

Hi there,

I think I figured out how to do this today (pull the EPlus table into a
pandas DataFrame), so I closed the issue for now. I'll let you know if I
run into any more snags.

Thanks so much for your responsiveness!
Amalia

On Wed, Dec 17, 2014 at 3:55 AM, Jamie Bull [email protected]
wrote:

I'm reasonably familiar with pandas and would be happy to help out on that
aspect if we have a new issue opened.

On Wed, Dec 17, 2014, 01:23 santoshphilip [email protected]
wrote:

Regarding taking the table data to numpy or pandas, can you open a new
issue for this ?
I'll probably assign it to a contributor familiar with pandas.

I assume you will help in updating the documentation when the code is
ready ?
(I am not kidding here :-)


Reply to this email directly or view it on GitHub
#36 (comment).


Reply to this email directly or view it on GitHub
#36 (comment).

from eppy.

santoshphilip avatar santoshphilip commented on September 2, 2024

Amalia,
would you like to contribute that code to eppy ?
The strength of open source projects come from people contributing to it.

jamiebull1 or myself can take a look at the best place to put the code.
If the code is very simple, we could just make an entry into the wiki. The wiki is at:

https://github.com/santoshphilip/eppy/wiki

The wiki is open for public editing (meaning, anyone can edit it)

Amalia could reopen issue #37 to track this task

from eppy.

amaliahicks avatar amaliahicks commented on September 2, 2024

Sure, I'd be happy to help. It's actually just one command, once you've
identified your table of choice. The thing that was tripping me up was
that I wanted the code to either append the DataFrames with tables from
additional EP runs, or dynamically create enough DataFrames to represent a
variable number of EP runs (because often we don't know how many parametric
runs we're going to need for any given project).

Anyway, here's a snippet:

for file in files:
filehandle = open(filename,'r').read()
htables=readhtml.titletable(filehandle)
alltitles = [htable[0] for htable in htables]
ltables = readhtml.lines_table(filehandle) # reads the tables with
their titles

for ltable in ltables:
    if "End Uses" in '\n.join(ltable[0]) and "End Uses By Subcategory"

not in '\n'.join(ltable[0]):
atable=ltable[-1]
df=pf.DataFrame(atable)

Best,
m

On Wed, Dec 17, 2014 at 7:37 PM, santoshphilip [email protected]
wrote:

Amalia,
would you like to contribute that code to eppy ?
The strength of open source projects come from people contributing to it.

jamiebull1 or myself can take a look at the best place to put the code.
If the code is very simple, we could just make an entry into the wiki. The
wiki is at:

https://github.com/santoshphilip/eppy/wiki

The wiki is open for public editing (meaning, anyone can edit it)

Amalia could reopen issue #37
#37 to track this task


Reply to this email directly or view it on GitHub
#36 (comment).

from eppy.

santoshphilip avatar santoshphilip commented on September 2, 2024

there is more than one issue in this thread.
I am going to open another issue for pandas
and keep this only for the readhtml issue

from eppy.

eayoungs avatar eayoungs commented on September 2, 2024

amaliahicks,
Thanks for contributing back your code snippet. I'd love to talk more about what you're doing with the readhtml module. I started working on a function to pull arbitrary tables from the html output files, you can see a reference to it in issue #16 and view my new function in the 'eayoungs' branch.

Cheers

Eric

from eppy.

amaliahicks avatar amaliahicks commented on September 2, 2024

Hi Eric,

Thanks for getting in touch. I'd be happy to chat sometime about the
project I'm working on. I'm out most of this week, but maybe we could
reconnect later in January?

Best wishes and happy new year!
Amalia

_Amalia Hicks, Ph.D._Director of Research
[email protected] [email protected]
Sustainable Engineering Group
7475 Hubbard Avenue Suite 201
Middleton, WI 53562
608.836.4488 ext. 22 | Fax: 608.836.4477
www.sustaineng.com

On Sat, Dec 27, 2014 at 9:46 PM, Eric Youngson [email protected]
wrote:

amaliahicks,
Thanks for contributing back your code snippet. I'd love to talk more
about what you're doing with the readhtml module. I started working on a
function to pull arbitrary tables from the html output files, you can see a
reference to it in issue #16
#16 and view my new
function in the 'eayoungs' branch.

Cheers

Eric


Reply to this email directly or view it on GitHub
#36 (comment).

from eppy.

eayoungs avatar eayoungs commented on September 2, 2024

Sounds good.

from eppy.

eayoungs avatar eayoungs commented on September 2, 2024

Amalia,
I've got an updated approach to this project that I think might improve speed and versatility. You can find a link to my IPython notebook in the related enhancement feature here:
#16

I'm still prototyping but I just finished the code to zip all the tables into a dictionary so that they can be selected by name and read into a Pandas data-frame for plotting with Matplotlib. I'd love to hear what you think.

Happy Memorial Day!

Eric

from eppy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.