littletable 2.3. 5DD1 1
-
Added
Table.batched
, similar toitertools.batched
added in Python 3.13. Returns a generator that yields tables sliced into n-sized batches:for mini_table in tbl.batched(10): ... work with table containing only 10 entries ...
-
Extended arguments support in
Table.splitby
to accept named arguments that define the predicate splitting function in terms of the specific value of one or more row attributes:qa_data, production_assembly_data = data.splitby( lambda rec: rec.env == "prod" and rec.dept == "assembly" )
can be written as:
qa_data, production_data = data.splitby(env="prod", dept="assembly")
-
Added
using
argument toTable.create_search_index
to simplify creation of a search index attribute by using multiple existing attributes. See this example from theexplore_unicode.py
example:unicode.create_search_index( "name_words", using=["name", "unicode_1_name", "iso10646_comment"], )
The example creates a new field
name_words
by combining the attributesname
,unicode_1_name
, andiso10646_comment
, and then builds a search index using this new field.