File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -409,7 +409,27 @@ def _do_cell_alignment(self):
409409 cell .set_y (bottoms [row ])
410410
411411 def auto_set_column_width (self , col ):
412-
412+ """ Given column indexs in either List, Tuple or int. Will be able to
413+ automatically set the columns into optimal sizes.
414+
415+ Here is the example of the input, which triger automatic adjustment on
416+ columns to optimal size by given index numbers.
417+ -1: the row labling
418+ 0: the 1st column
419+ 1: the 2nd column
420+
421+ Args:
422+ col(List): list of indexs
423+ >>>table.auto_set_column_width([-1,0,1])
424+
425+ col(Tuple): tuple of indexs
426+ >>>table.auto_set_column_width((-1,0,1))
427+
428+ col(int): index integer
429+ >>>table.auto_set_column_width(-1)
430+ >>>table.auto_set_column_width(0)
431+ >>>table.auto_set_column_width(1)
432+ """
413433 # check for col possibility on iteration
414434 try :
415435 iter (col )
You can’t perform that action at this time.
0 commit comments