natsort: Simple yet flexible natural sorting in Python.¶
Source Code: https://github.com/SethMMorton/natsort
Downloads: https://pypi.org/project/natsort/
Documentation: https://natsort.readthedocs.io/
Please see the GitHub main page for everything else, including
Quick description
Basic examples
FAQ
Requirements and optional dependencies
Installation instructions
Testing instructions
Deprecation schedule
- 1. How Does Natsort Work?
- 2. Examples and Recipes
- 2.1. Basic Usage
- 2.2. Sort Version Numbers
- 2.3. Sort OS-Generated Paths
- 2.4. Locale-Aware Sorting (Human Sorting)
- 2.5. Controlling Case When Sorting
- 2.6. Customizing Float Definition
- 2.7. Using a Custom Sorting Key
- 2.8. Generating a Natsort Key
- 2.9. Sorting Multiple Lists According to a Single List
- 2.10. Returning Results in Reverse Order
- 2.11. Sorting Bytes on Python 3
- 2.12. Sorting a Pandas DataFrame
- 3. natsort API
- 4. Possible Issues with
humansorted()
orns.LOCALE
- 5. Shell Script
- 6. Changelog