Python Pip install and pretty table : Python programming for beginners

preview_player
Показать описание
Python Pip install and pretty table - in this video I will walk you through how to install a package and how to use the pretty table module

Code for tutorial:-
---------------------------------------------------------------------------
from prettytable import PrettyTable

table1 = PrettyTable()

# Adding rows one row at a time

print(table1)

# Adding all the rows at once
table2 = PrettyTable()
[
["Adelaide", 1295, 1158259, 600.5],
["Brisbane", 5905, 1857594, 1146.4],
["Darwin", 112, 120900, 1714.7],
["Hobart", 1357, 205556, 619.5],
["Sydney", 2058, 4336374, 1214.8],
["Melbourne", 1566, 3806092, 646.9],
["Perth", 5386, 1554769, 869.4],
]
)
print(table2)

# Adding data one column at a time
table3 = PrettyTable()
["Adelaide","Brisbane","Darwin","Hobart","Sydney","Melbourne","Perth"])
1554769])
869.4])

print(table3)

from prettytable import from_csv
table4 = from_csv(fi)

print(table4)

Рекомендации по теме
Комментарии
Автор

pretty easy and faster to understand than going thru documentation

Pasdpawn
Автор

Thanks for the video! It helped me greatly.

chicoman
Автор

my terminal is saying error external venv

mendysbusisiwemkize
join shbcf.ru