-------------
- Added grouping support in Table.present(), Table.as_html() and
Table.as_markdown(). Pass `groupby` parameter to indicate grouping
field.
tbl.present(groupby="ColumnA")
will display the table with repeated consecutive values for ColumnA
suppressed.
Multiple fields can be specified for grouping using a space-delimited
string. If multiple fields are given, they will be grouped hierarchically;
that is, the second field will group only if already grouping on the first
field, the third field will group only if already grouping on the second
field, etc. (For best grouping output, sort the records first.)
tbl = lt.Table("Academy Awards").csv_import("""\
year,award,movie,recipient
1960,Best Picture,Ben-Hur,
1960,Best Actor,Ben-Hur,Charlton Heston
1960,Best Actress,The Heiress,Simone Signoret
1960,Best Director,Ben-Hur,William Wyler
...
""")
tbl.present(groupby="year")
Academy Awards
Year Award Movie Recipient
────────────────────────────────────────────────────────────────────────────
1960 Best Picture Ben-Hur
Best Actor Ben-Hur Charlton Heston
Best Actress The Heiress Simone Signoret
Best Director Ben-Hur William Wyler
1961 Best Picture The Apartment
Best Actor Elmer Gantry Burt Lancaster
Best Actress Butterfield 8 Elizabeth Taylor
Best Director The Apartment Billy Wilder
1962 Best Picture West Side Story
Best Actor Judgment at Nuremberg Maximilian Schell
Best Actress Two Women Sophia Loren
Best Director West Side Story Willian Wise/Jerome Robbins
- Modified the table created by stats() to include a 'missing' column,
and reordered the columns so that when presented, the most likely interesting
stat (mean) is listed first.
- Added attributes to Table to record import source and type for csv_import,
tsv_import, and json_import. For imports from files or web urls, the
filename or url will be added as the table's default title.
- Added support and test cases for storing objects using the HasTraits
classes from the traits and traitlets packages. (Working with HasTraits
objects in a littletable.Table requires that they add littletable.HasTraitsMixin
to their inheritance classes).
- Added test cases for storing objects created using the attrs package.