gunrock / io

Input (scripts, etc.) and output (scripts, performance results, etc.) for Gunrock and other graph engines
10 stars 6 forks source link

how to get html tables out #7

Open jowens opened 8 years ago

jowens commented 8 years ago

Let's say I want to output an HTML table instead of a graph. Much of the machinery here can be reused; basically I just want to dump the pandas dataframe. But it's a little kludgey to do this.

For instance, I could have an output type case entry of table() (as an alternative to vegajson(), html(), etc.), and it seems like using --outputtype makes sense here from create_graph. The graph data structure should be available in the output type case entry, and I could just call print(graph.to_html()). But graph is only a dataframe in the VegaGraphBase base class; for the subclasses (Bar and Scatter), it instead returns a JSON object. I'd like to get the dataframe back.