merge_td_columns

merge_td_columns(rows, num_to_merge=None, vertical_align=False)[source]

Merge HTML TD columns with identical values using rowspan.

Arguments: rows -- a list of tuples, one tuple per row, containing n elements for the

n columns.

num_to_merge -- the number of columns to merge, starting from the left

hand column. Leave as None to merge all columns.

vertical_align -- Set to True to vertically centre any merged/unmerged cells.

Output: A list of strings, one string per row, containing TD elements.