|||

emlib documentation

Quick search

  • misc: Miscellaneous functionality
    • allequal
    • asnumber
    • astype
    • can_be_pickled
    • cm_to_pixels
    • deepupdate
    • dictmerge
    • distribute_in_zones
    • dumpobj
    • duplicates
    • find_attrs
    • first_existing_path
    • firstval
    • fractional_slice
    • html_table
    • inches_to_pixels
    • isgeneratorlike
    • isiterable
    • issorted
    • moses
    • namedtuple_addcolumn
    • namedtuple_extend
    • namedtuples_renamecolumn
    • nearest_element
    • nearest_index
    • nearest_unsorted
    • open_with_app
    • page_dinsize_to_mm
    • parse_time
    • pixels_to_cm
    • pixels_to_inches
    • print_table
    • public
    • remove_duplicates
    • remove_last_matching
    • replace_sigint_handler
    • reverse_recursive
    • rgb_to_hex
    • sec2str
    • seq_contains
    • simplify_breakpoints
    • singleton
    • snap_array
    • snap_to_grid
    • some
    • sort_natural
    • sort_natural_dict
    • str_is_number
    • type_error_msg
    • wait_for_file_modified
    • wrap_by_sizes
    • zipsort
    • ReprMixin
    • temporary_sigint_handler
  • textlib: Routines for working with text
  • filetools: Utilities to work with files and filenames
  • iterlib: More itertools
  • img: Utilities for working with images, using pillow
  • doctools: Tools to parse and generate documentation
  • csvtools: Utilities to read and write csv files
  • jsontools: Set of misc. utilities to work with json
  • Result: a class to encapsulate the result of an operation
  • containers: Diverse containers
  • dialogs: Simple dialogs for use at the repl / ipython / jupyter
  • mathlib: Miscellaneous math utilities
  • numpytools: Miscellaneous utilities for working with numpy arrays
  • matplotting: Routines to help draw shapes / labels within a matplotlib
  • calculus: Calculus utilities, based on calculus.jl
  • combinatorics: Functions for combinatorics
  • numberseries: Generate diverse number series
  • graphlib: ???
  • net: Utility functions related to network

print_table¶

emlib.misc.print_table(rows, headers=(), tablefmt='', showindex=True, floatfmt='g')[source]¶

Print rows as table

Parameters:
  • rows (list) – a list of namedtuples or dataclass objects, all of the same kind

  • headers – override the headers defined in rows

  • tablefmt – if None, a suitable default for the current situation will be used (depending on if we are running inside jupyter or in a terminal, etc) Otherwise it is passed to tabulate.tabulate

  • floatfmt (str | tuple[str, ...]) – a format for all floats or a tuple of formats

  • showindex – if True, add a column with the index of each row

Return type:

None

<Page contents

>Page contents:

  • print_table
    • print_table()
<pixels_to_inches
public>
© Copyright 2021, Eduardo Moguillansky. Created using Sphinx 8.1.3.

Styled using the Piccolo Theme