-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
PythonIssues related to the Python toolsIssues related to the Python toolsbugSomething isn't workingSomething isn't working
Description
pdstools version checks
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pdstools.
Issue description
def _format_compact(self, num: float) -> str:
"""Format in compact notation (K/M/B/T)."""
if num == 0:
return "0"
abs_num = abs(num)
for threshold, suffix in [(1e12, "T"), (1e9, "B"), (1e6, "M"), (1e3, "K")]:
if abs_num >= threshold:
return f"{num / threshold:,.{self.decimals}f}{suffix}"
return f"{num:,.{self.decimals}f}"returns numbers as strings, which does not work nicely in tables such as on dsi.
Reproducible example
visit dsi, order on number of actionsExpected behavior
4k > 500 when ordering the table
Installed versions
Details
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
PythonIssues related to the Python toolsIssues related to the Python toolsbugSomething isn't workingSomething isn't working