Save table as image or csv file when using tabulate library in python

Viewed 644

I want to save such a table as an image or CSV file. I used the tabulate library to produce the table. I know I can create it from pandas, but I need to make it by this library. Can anyone guide me? Thanks

from tabulate import tabulate
print(tabulate([['Alice', 24], ['Bob', 19]], headers=['Name', 'Age']))

The output is:

enter image description here

0 Answers
Related