sorted-months-weekdays
It sorts list of months or list of weekdays in a chronological order not in alphabetical order
The default python or pandas sort functions sort month names and weekdays in an alphabetical order. I checked a lot to find a function which sorts in chronological order but couldn't find one, so I created this simple package.
How to install
pip install sorted-months-weekdays
There are two main functions in this package Month_Sorted_Month Weekday_Sorted_Week
How to import
from sorted_months_weekdays import Month_Sorted_Month, Weekday_Sorted_Week
Example1
samplemonthnames1 = ['Apr','Jan','Dec','Mar','Oct']
samplemonthnames2 = ['December', 'January', 'June', 'March', 'September']
Month_Sorted_Month(samplemonthnames1)
Result: ['Jan', 'Mar', 'Apr', 'Oct', 'Dec']
Month_Sorted_Month(samplemonthnames2)
Result: ['January', 'March', 'June', 'September', 'December']
Example2
testweeknames1 = ['Tue','Thu','Mon','Sun']
testweeknames2 = ['Saturday','Tuesday','Friday','Monday']
Weekday_Sorted_Week(testweeknames1)
Result: ['Mon', 'Tue', 'Thu', 'Sun']
Weekday_Sorted_Week(testweeknames2)
Result: ['Monday', 'Tuesday', 'Friday', 'Saturday']
This function also handles lower and upper case and mixed case months and weekdays lists.
Metadata
Release files for sorted-months-weekdays 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sorted_months_weekdays-0.2.tar.gz | 2.7 kB | Without provenance | Details |
Release files / sorted_months_weekdays-0.2.tar.gz
| Download URL | sorted_months_weekdays-0.2.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da789b04ef3cbb24df8044cef14669b3f9a5ade729ad4f3be04cb36f7612d824
|
|
BLAKE2b-256 checksum How to use checksums |
8a96885ab16f3653bcf7a035b9dcf0089f2b5e26a2af76573fc458dcb51758fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1
|
Security for sorted-months-weekdays 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.