Skip to content

Commit

Permalink
Notes updates
Browse files Browse the repository at this point in the history
  • Loading branch information
JavaScriptDude authored May 2, 2022
1 parent ada3c7f commit 5aa62af
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## `multisort` - NoneType Safe Multi Column Sorting
## `multisort` - NoneType Safe Multi Column Sorting For Python

Simplified multi-column sorting of lists of tuples, dicts, lists or objects that are NoneType safe.

Expand Down Expand Up @@ -69,6 +69,21 @@ rows_sorted = msorted(rows_dict, [
])
```
`msorted` parameters:
option|dtype|description
---|---|---
`key`|int or str|Key to access data. int for tuple or list
`spec`|str, int, list|Sort specification. Can be as simple as a column key / index
`reverse`|bool|Reverse order of final sort (defalt = False)

`msorted` `spec` options:
option|dtype|description
---|---|---
reverse|bool|Reverse sort of column
clean|func|Function / lambda to clean the value
none_first|bool|If True, None will be at top of sort. Default is False (bottom)



### `sorted` with `reversor`
Sort rows_dict by _grade_, descending, then _attend_ and call upper() for _grade_:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "multisort"
version = "0.1.0"
version = "0.1.1"
description = "NoneType Safe Multi Column Sorting For Python"
license = "MIT"
authors = ["Timothy C. Quinn"]
Expand Down

0 comments on commit 5aa62af

Please sign in to comment.