Code Monkey home page Code Monkey logo

Comments (8)

santoshphilip avatar santoshphilip commented on September 2, 2024
  1. cleanup the non-ascii characters in the cells of the table

from eppy.

santoshphilip avatar santoshphilip commented on September 2, 2024

put an html viewer that can be used in ipython notebook

from IPython.display import HTML
HTML(str(soup.table))

from eppy.

eayoungs avatar eayoungs commented on September 2, 2024

I've started a function, 'report_tables', which creates a dictionary of all the Report objects in the output file. I'm working on the unit test for the function now on my 'eayoungs' branch.

from eppy.

eayoungs avatar eayoungs commented on September 2, 2024

'report_tables' function appears to be working. Created a test with py.test using the same sample html input used to test other functions in readhtml.py
Also created a 'select_table' function to specify an EnergyPlus report to pull from the selected output file. Expecting to pass the report's contents to the '_make_ntgrid' function to create an immutable array for the selected report in which each value can be addressed by the names of the row & column in which it occurs.

FYI - Changes are on the 'eayoungs' branch and have not been merged with master yet.

from eppy.

eayoungs avatar eayoungs commented on September 2, 2024

I think it would be useful, at some point, to allow the option for these functions to work with the EnergyPlus SQLite output option. Reports and resulting data sets should the same, but rather than parsing an entire E+ output file into Python data structures prior to manipulation, this would use queries to read individual records and parse only the data contained therein as needed.

This occurred to me as I was reading up on the custom Python data type, collections.namedtuple() (https://docs.python.org/2/library/collections.html#collections.namedtuple) used in the '_make_ntgrid' function, where reading a database record into the 'namedtuple' is an explicitly recommended application for the datatype.
"Named tuples are especially useful for assigning field names to result tuples returned by the csv or sqlite3 modules"

from eppy.

eayoungs avatar eayoungs commented on September 2, 2024

I've committed new changes to the _report_tables function. I was trying to create a report dictionary containing dictionaries of all tables in each report.
I've made some good progress and have at least created a dictionary of all tables but need to further refine the process of extracting the table name out of the header by the lines_table function, and refine the logic behind creating a report dictionary with each report name as a key and a dictionary of all the tables in the report as the value.

from eppy.

eayoungs avatar eayoungs commented on September 2, 2024

Santosh, I've been working on this lately for myself and as a request from a colleague. I've got the following IPython notebook. Let me know what you think.
https://github.com/eayoungs/EPlusTemplates/blob/public/Scripting/readhtml.ipynb

Happy Memorial Day

Eric

from eppy.

santoshphilip avatar santoshphilip commented on September 2, 2024

Good I'll take a look and respond.

Santosh.

Sent from my iPad

On May 25, 2015, at 10:35 AM, Eric Youngson [email protected] wrote:

Santosh, I've been working on this lately for myself and as a request from a colleague. I've got the following IPython notebook. Let me know what you think.
https://github.com/eayoungs/EPlusTemplates/blob/public/Scripting/readhtml.ipynb

Happy Memorial Day

Eric


Reply to this email directly or view it on GitHub.

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.