|
return tabulate.tabulate(rows, headers=col_headers, tablefmt='html') |
While using this code, you'll get an Attribute error:
AttributeError: 'function' object has no attribute 'tabulate'
That's because the function tabulate got a syntax like:
tabulate(object, attributes)
So the right way is to replace with:
return tabulate(rows, headers=col_headers, tablefmt='html')
This will lay to no error.