dataframe-core-2.2.0.0: Core data structures for the dataframe library.
Safe HaskellNone
LanguageHaskell2010

DataFrame.Display.Terminal.PrettyPrint

Synopsis

Documentation

data RenderFormat Source #

Output format for showTable. Plain renders a terminal-style table with ASCII borders; Markdown renders a GitHub-flavoured pipe table suitable for notebooks.

Constructors

Plain 
Markdown 

type Filler = Int -> Text -> Text Source #

data ColDesc t Source #

Constructors

ColDesc 

showTable :: RenderFormat -> [Text] -> [Text] -> [Vector Text] -> Text Source #

Render a table from column-major data. columns has one Vector per column; widths are computed in one pass per column (no row-major transpose), and row lines are built by indexing each column at row i.

escapeMarkdownCell :: Text -> Text Source #

Escape a value for a GitHub-flavoured Markdown table cell: a bare | would end the cell and a newline would end the row, so both are neutralised (the pipe backslash-escaped, the newline turned into a <br>).