| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
DataFrame.Display.Terminal.PrettyPrint
Synopsis
- data RenderFormat
- type Filler = Int -> Text -> Text
- data ColDesc t = ColDesc {
- colTitleFill :: Filler
- colTitle :: Text
- colValueFill :: Filler
- fillLeft :: Char -> Int -> Text -> Text
- fillRight :: Char -> Int -> Text -> Text
- fillCenter :: Char -> Int -> Text -> Text
- left :: Int -> Text -> Text
- right :: Int -> Text -> Text
- center :: Int -> Text -> Text
- showTable :: RenderFormat -> [Text] -> [Text] -> [Vector Text] -> Text
- escapeMarkdownCell :: Text -> Text
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.
Instances
| Show RenderFormat Source # | |
Defined in DataFrame.Display.Terminal.PrettyPrint Methods showsPrec :: Int -> RenderFormat -> ShowS # show :: RenderFormat -> String # showList :: [RenderFormat] -> ShowS # | |
| Eq RenderFormat Source # | |
Defined in DataFrame.Display.Terminal.PrettyPrint | |
Constructors
| ColDesc | |
Fields
| |
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>).