data-table

API Reference

data-table

A library providing a data-table class, and useful functionality around this

DATA-TABLE

  • Class DATA-TABLE
    A class representing a table of data
    COLUMN-NAMES   Accessor: COLUMN-NAMES
    COLUMN-TYPES   Accessor: COLUMN-TYPES
    ROWS   Accessor: ROWS
  • Method NUMBER-OF-COLUMNS ((dt data-table))
  • Method NUMBER-OF-ROWS ((dt data-table))
  • Method SYMBOLIZE-COLUMN-NAMES ((dt data-table))
    Turn the column names of the data table into lisp symbols
  • Method SYMBOLIZE-COLUMN-NAMES! ((dt data-table))
    Turn the column names of the data table into lisp symbols save the new column names to the data table
  • Method DATA-TABLE-VALUE ((dt data-table) &key col-name col-idx row-idx row)
    Extract a value or set of values from the data table can be used to pull a column of data, a row of data or a specific cell of data
  • Method (setf DATA-TABLE-VALUE) (new (dt data-table) &key col-name row-idx col-idx)
    Set a specific row, column or cell of the data table
  • Method MAKE-SUB-TABLE (parent &key (lci 0) (uci (number-of-columns parent)) (lri 0) (uri (number-of-rows parent)))
    Make a new data table from a subset of another data-table lci - low column index uci - upper column index (as per subseq 1 beyond the col you want) lri - low row index uri - upper row index (as per subseq 1 beyond the row you want)
  • Function SELECT-COLUMNS (table column-names)
    returns a new data table with only the columns requested, by name
  • Method DATA-TABLE-DATA-COMPARE (dt1 dt2 &key (test #'equalp) (key #'identity))
    tries to comapre the data in two data-tables
  • Method OVERLAY-REGION ((new data-table) (dt data-table) &key (row-idx 0) (col-idx 0))
    puts all values from new-dt into dt starting at row-idx col-idx
  • Method FILL-IN-MISSING-CELLS ((dt data-table) &optional missing-value)
    Ensures that the data table is square and that every column has the same number of rows and every row has the same number of columns, filling in nil to accomplish this
  • Variable *GUESSING-TYPES-SAMPLE-SIZE*
    1000
    how many rows to look at when trying to guess the types for each column of a data table
  • Condition BAD-TYPE-GUESS  (ERROR)
  • Function COERCE-DATA-TABLE-OF-STRINGS-TO-TYPES (dt)
    Figure out what the data-table-types should be then convert all the data in the table to those types
  • Function COLUMN-INDEX (col dt)
  • Function COLUMN-TYPE (col dt)
  • Function (setf COLUMN-TYPE) (new col dt)
  • Function COLUMN-NAME (col dt)
  • Function (setf COLUMN-NAME) (new col dt)
  • Method COERCE-VALUE-FOR-OUTPUT ((dt data-table) column-name val output-type &aux (*list-delimiter* *list-delimiter*))
    Coerce a data-tables-value to a specified output format. By default only strings are supported. This method is intended to be extended in other applications to allow mutating to html / csv / etc
  • Function COERCE-DATA-TABLE-VALUES-FOR-OUTPUT! (dt &key output-type)
    Coerce for output all the values in all the rows and save the result to the rows slot
  • Function COERCE-DATA-TABLE-VALUES-FOR-OUTPUT (dt &key output-type)
    Coerce for output all the values in all the rows and return the new rows
  • Function ADD-COLUMN (dt column-name &optional default (column-type 'string) (index 0))
    Adds a new column to the data table passed in
  • Function ALISTS-TO-DATA-TABLE (list-of-alists &key (test #'equalp) (keys (alist-keys (first list-of-alists))))
    given a list of alists, (all with the same keys) convert them to a data-table
  • Function PLISTS-TO-DATA-TABLE (list-of-plists &key (keys (plist-keys (first list-of-plists))))
  • Function DATA-TABLE-TO-PLISTS (dt)
  • Function DATA-TABLE-TO-ALISTS (dt)

data-table-clsql

A library providing a data-table class, and useful functionality around this

No packages.