File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 1- ## ` multisort ` - NoneType Safe Multi Column Sorting
1+ ## ` multisort ` - NoneType Safe Multi Column Sorting For Python
22
33Simplified multi-column sorting of lists of tuples, dicts, lists or objects that are NoneType safe.
44
@@ -69,6 +69,21 @@ rows_sorted = msorted(rows_dict, [
6969])
7070
7171```
72+ ` msorted ` parameters:
73+ option|dtype|description
74+ ---|---|---
75+ ` key ` |int or str|Key to access data. int for tuple or list
76+ ` spec ` |str, int, list|Sort specification. Can be as simple as a column key / index
77+ ` reverse ` |bool|Reverse order of final sort (defalt = False)
78+
79+ ` msorted ` ` spec ` options:
80+ option|dtype|description
81+ ---|---|---
82+ reverse|bool|Reverse sort of column
83+ clean|func|Function / lambda to clean the value
84+ none_first|bool|If True, None will be at top of sort. Default is False (bottom)
85+
86+
7287
7388### ` sorted ` with ` reversor `
7489Sort rows_dict by _ grade_ , descending, then _ attend_ and call upper() for _ grade_ :
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " multisort"
3- version = " 0.1.0 "
3+ version = " 0.1.1 "
44description = " NoneType Safe Multi Column Sorting For Python"
55license = " MIT"
66authors = [" Timothy C. Quinn" ]
You can’t perform that action at this time.
0 commit comments