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.
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 tovegajson()
,html()
, etc.), and it seems like using--outputtype
makes sense here fromcreate_graph
. Thegraph
data structure should be available in the output type case entry, and I could just callprint(graph.to_html())
. Butgraph
is only a dataframe in theVegaGraphBase
base class; for the subclasses (Bar and Scatter), it instead returns a JSON object. I'd like to get the dataframe back.