Creating Tables with PrettyTable
🔸PrettyTable is a simple Python library designed to make it easy to represent tabular data in nice and neat ASCII tables.
⚙️Installation
You can add columns as well by using the
🔗GitHub
#prettytable
🔸PrettyTable is a simple Python library designed to make it easy to represent tabular data in nice and neat ASCII tables.
⚙️Installation
pip install prettytable
PrettyTable class, provided by this library, allows you to create such a tables. To add a new row to a table, simply set the field names of your table using the field_names
attribute, and then add rows using the add_row()
method.You can add columns as well by using the
add_column()
method, which takes two arguments: the column name and a list or tuple which contains the column data.🔗GitHub
#prettytable