8000 Release littletable 2.3.1 · ptmcg/littletable · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

littletable 2.3. 5DD1 1

Compare
Choose a tag to compare
@ptmcg ptmcg released this 10 Jul 13:50
· 57 commits to master since this release
  • Added Table.batched, similar to itertools.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 to Table.create_search_index to simplify creation of a search index attribute by using multiple existing attributes. See this example from the explore_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 attributes name, unicode_1_name, and iso10646_comment, and then builds a search index using this new field.

0