import sys

from datetime import datetime


def print_info(info, file=sys.stdout, end="\n"):
    print("[{0}]: {1}".format(datetime.now().strftime('%H:%M:%S'), info), file=file, end=end)


def print_err(info):
    print_info(info, file=sys.stderr)


def print_table(table):
    col_width = max(len(str(word)) for row in table for word in row) + 2  # padding
    for row in table:
        print ("".join(str(word).ljust(col_width) for word in row))

@@ -5,16 +5,86 @@
 rt sys%0A%0A
+from typing import Union, Iterable, List%0Afrom pandas import DataFrame%0A
 from dat
@@ -105,16 +105,16 @@
 atetime%0A
-
 %0A%0Adef pr
@@ -334,19 +334,309 @@
 le(table
-):%0A
+: Union%5BDataFrame, list%5D):%0A    print()%0A%0A    if isinstance(table, DataFrame):%0A        col_widths = _get_dataframe_col_widths(table)%0A        col_widths = %5Bwidth + 2 for width in col_widths%5D%0A        for _, row in table.iterrows():%0A            _print_row(row, col_widths=col_widths)%0A    else:%0A    
     col_
@@ -711,16 +711,20 @@
 padding%0A
+    
     for 
@@ -749,64 +749,680 @@
     
-print (%22%22.join(str(word).ljust(col_width) for word in row))%0A
+    _print_row(row, col_width)%0A%0A%0Adef _print_row(row: Iterable, col_width: int = 0, col_widths: List%5Bint%5D = None):%0A    if col_widths:%0A        tmp_list = %5Bstr(word).ljust(col_widths%5Bcol_i%5D) for col_i, word in enumerate(row)%5D%0A    else:%0A        tmp_list = %5Bstr(word).ljust(col_width) for word in row%5D%0A    print(%22%22.join(tmp_list))%0A%0A%0Adef _get_dataframe_col_widths(table: DataFrame) -%3E List%5Bint%5D:%0A    widths = %5B%5D%0A    for column in table.columns:%0A        width = table%5Bcolumn%5D.map(lambda x: len(str(x))).max()%0A        widths.append(width)%0A%0A    return widths%0A%0A%0Adef test_print_table():%0A    df = DataFrame(%5B%5B'A', 24%5D, %5B'X', 62%5D, %5B'F', 0%5D%5D, columns=%5B'class', 'count'%5D)%0A    print_table(df)

print table function upgrade - now it can be used for pandas dataframes