Functions | |
def | help () |
def | importDF (path) |
def | indent (rows, hasHeader=False, headerChar='-', delim='| ', justify='left', separateRows=False, prefix='', postfix='', wrapfunc=lambda x:x) |
def | search (query) |
def | wrap_always (text, width) |
def | wrap_onspace (text, width) |
def | wrap_onspace_strict (text, width) |
def dataformats.help | ( | ) |
def dataformats.importDF | ( | path | ) |
Definition at line 85 of file dataformats.py.
References split.
Referenced by help().
def dataformats.indent | ( | rows, | |
hasHeader = False , |
|||
headerChar = '-' , |
|||
delim = ' | ' , |
|||
justify = 'left' , |
|||
separateRows = False , |
|||
prefix = '' , |
|||
postfix = '' , |
|||
wrapfunc = lambda x:x |
|||
) |
Indents a table by column. - rows: A sequence of sequences of items, one sequence per row. - hasHeader: True if the first row consists of the columns' names. - headerChar: Character to be used for the row separator line (if hasHeader==True or separateRows==True). - delim: The column delimiter. - justify: Determines how are data justified in their column. Valid values are 'left','right' and 'center'. - separateRows: True if rows are to be separated by a line of 'headerChar's. - prefix: A string prepended to each printed row. - postfix: A string appended to each printed row. - wrapfunc: A function f(text) for wrapping text; each element in the table is first wrapped by this function.
Definition at line 6 of file dataformats.py.
References genParticles_cff.map, hpstanc_transforms.max, split, harvestTrackValidationPlots.str, tablePrinter.wrapfunc, and ComparisonHelper.zip().
Referenced by search().
def dataformats.search | ( | query | ) |
Definition at line 105 of file dataformats.py.
References indent(), join(), split, and wrap_always().
Referenced by help().
def dataformats.wrap_always | ( | text, | |
width | |||
) |
A simple word-wrap function that wraps text on exactly width characters. It doesn't split the text in words.
Definition at line 71 of file dataformats.py.
References createfilelist.int, and join().
Referenced by search(), and wrap_onspace_strict().
def dataformats.wrap_onspace | ( | text, | |
width | |||
) |
A word-wrap function that preserves existing line breaks and most spaces in the text. Expects that existing line breaks are posix newlines (\n).
Definition at line 48 of file dataformats.py.
Referenced by lumiReport.toScreenConfHlt(), lumiReport.toScreenLSBeam(), and wrap_onspace_strict().
def dataformats.wrap_onspace_strict | ( | text, | |
width | |||
) |
Similar to wrap_onspace, but enforces the width constraint: words longer than width are split.
Definition at line 64 of file dataformats.py.
References harvestTrackValidationPlots.str, wrap_always(), and wrap_onspace().
Referenced by lumiReport.toScreenLSEffective(), and lumiReport.toScreenTotEffective().