paulroth3d / jupyter-ijavascript-utils

Utility library for working with iJavaScript - a Jupyter Kernel
1 stars 0 forks source link

Add in flag to TableGenerator.generateArray to include headers in data #7

Closed paulroth3d closed 2 years ago

paulroth3d commented 2 years ago

Currently, the header is separate from the data, but this can get obnoxious, especially if you want o work on the results.

it would be much easier if we could support including the headers and results together to skip capturing the results or wrapping in a simple function

paulroth3d commented 2 years ago

Found in the TableGenerator class, within the generate method

currently people just getting started have to wrap with something simple like:

‘’’ combineArrayHeaders = (results) => [results.header, …results.data]; ‘’’

paulroth3d commented 2 years ago

Fixed in 1..9.0

Now available in both: TableGenerator.generateArray2

Also through TableGenerator.transpose()

i.e.

new utils.TableGenerator(data)
 .transpose()
 .generateMarkdown();

Thank you for the feedback!

Marking as closed.