Skip to content

doc: Add an example for sorting abbreviated numeric values#71

Merged
JeffFaer merged 1 commit intogoogle:mainfrom
tenF:patch-1
Feb 10, 2025
Merged

doc: Add an example for sorting abbreviated numeric values#71
JeffFaer merged 1 commit intogoogle:mainfrom
tenF:patch-1

Conversation

@tenF
Copy link
Contributor

@tenF tenF commented Feb 10, 2025

Standard numeric sort does not handle abbreviated numbers (e.g., 1k, 1M, 1B) correctly. This commit adds an example demonstrating how to use the by_regex option in conjunction with numeric sort to enable accurate sorting of such numbers.

The by_regex option can also be easily modified to sort other types of data with units, such as data storage units (KB, MB, GB, TB).

@JeffFaer JeffFaer self-requested a review February 10, 2025 16:46
@JeffFaer JeffFaer enabled auto-merge (squash) February 10, 2025 16:47
@JeffFaer JeffFaer merged commit 799ca64 into google:main Feb 10, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants