Show page ranks in scientific notation

This commit is contained in:
Peter Vacho 2024-11-24 19:53:23 +01:00
parent bdb9529b77
commit 2fdb600c50
Signed by: school
GPG key ID: 8CFC3837052871B4

View file

@ -20,7 +20,7 @@ def display_top_urls(ranking: dict[httpx.URL, float], top_n: int = 50) -> None:
# Add rows to the table # Add rows to the table
for idx, (url, score) in enumerate(sorted_urls[:top_n], start=1): for idx, (url, score) in enumerate(sorted_urls[:top_n], start=1):
table.add_row(str(idx), str(url), f"{score:.18f}") table.add_row(str(idx), str(url), f"{score:.4e}")
# Render the table # Render the table
console = Console() console = Console()