{ "info": { "author": "Yeddu Dinesh Babu", "author_email": "ydineshy225@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# sort-dataframeby-monthorweek\nIt sorts a dataframe by month names or by week names\n\nAssume a dataframe has a month name column and one wants to sort the dataframe by month column in chronological order, this package helps to do that. This package can also be used to sort dataframe by weekday column.\n\n# How to install\n pip install sort-dataframeby-monthorweek\n\t\nThere is another dependency package needs to be installed.\n``` python\n pip install sorted-months-weekdays\n```\n \nThere are 4 different functions in this package. We will see usage of below mentioned functions.\n\n```python\n Sort_Dataframeby_Month\n Sort_Dataframeby_Weekday\n```\n\n# Example1\nIn this example we will see how to sort a sample dataframe by month name column\n``` python\n import pandas as pd\n\timport itertools\n \n df = pd.DataFrame([['Feb',254],['Apr',420],['Jan',301],['Mar',449]],columns=['Month','Sales'])\n df\n Out: \n Month Sales\n 0 Feb 254\n 1 Apr 420\n 2 Jan 301\n 3 Mar 449\n```\nNow, use Sort_Dataframeby_Month function to sort above dataframe\n``` python\n df_sort = sort_dataframeby_monthorweek.Sort_Dataframeby_Month(df=df,monthcolumnname='Month')\n df_sort\n Out:\n Month Sales\n 0 Jan 301\n 1 Feb 254\n 2 Mar 449\n 3 Apr 420\n```\n\n# Example2\nIn this example we will see how to sort a sample dataframe by weekday column\n\n``` python\n df1 = pd.DataFrame([['Tue',25],['Thu',42],['Mon',30],['Wed',44]],columns=['Weekday','Sales'])\n df1\n Out: \n Weekday Sales\n 0 Tue 25\n 1 Thu 42\n 2 Mon 30\n 3 Wed 44\n```\nNow, use Sort_Dataframeby_Weekday function to sort df1\n\n``` python\n df1_sort = sort_dataframeby_monthorweek.Sort_Dataframeby_Weekday(df=df1,Weekdaycolumnname='Weekday')\n df1_sort\n Out: \n Weekday Sales\n 0 Mon 30\n 1 Tue 25\n 2 Wed 44\n 3 Thu 42\n```\nAbove functions work for lower, upper and mixed case months or weekdays. It works for full names of months ('January') and weekdays ('Monday') as well.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ydineshy225/sort-dataframeby-monthorweek", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "sort-dataframeby-monthorweek", "package_url": "https://pypi.org/project/sort-dataframeby-monthorweek/", "platform": "", "project_url": "https://pypi.org/project/sort-dataframeby-monthorweek/", "project_urls": { "Homepage": "https://github.com/ydineshy225/sort-dataframeby-monthorweek" }, "release_url": "https://pypi.org/project/sort-dataframeby-monthorweek/0.4/", "requires_dist": null, "requires_python": "", "summary": "Sort a dataframe by month name or by weekday name in chronological order", "version": "0.4" }, "last_serial": 4905352, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "670badba3eaf3fa9fd67d61fbbb5e760", "sha256": "3c7b8ba42a0f3a29ce385e2c2c514d5600df68845f109efda8d4457e3613d5f4" }, "downloads": -1, "filename": "sort_dataframeby_monthorweek-0.1.tar.gz", "has_sig": false, "md5_digest": "670badba3eaf3fa9fd67d61fbbb5e760", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1712, "upload_time": "2018-02-23T09:24:21", "url": "https://files.pythonhosted.org/packages/51/af/32e413566ceb9b3640ea9c151ac42721b515fb61c778c77b6009b6c5d938/sort_dataframeby_monthorweek-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "8d60235233762de3f7e02db2e9f72628", "sha256": "ed8a6a3b1b00fe0b5d92084ccd3c3fc8253c3bf6a2c4954fa28c5ffdd88d2c06" }, "downloads": -1, "filename": "sort_dataframeby_monthorweek-0.2.tar.gz", "has_sig": false, "md5_digest": "8d60235233762de3f7e02db2e9f72628", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2760, "upload_time": "2019-03-05T16:54:14", "url": "https://files.pythonhosted.org/packages/23/11/a0529cf658948e78a8f618bb00f5abce23890521ab59c3125d8f175e82fe/sort_dataframeby_monthorweek-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "778fa0f56cc6d78467e16034f081b26f", "sha256": "4f979d01447786f731efb88d8290319c055a122938359f4c3c263a53a3820ad8" }, "downloads": -1, "filename": "sort_dataframeby_monthorweek-0.3.tar.gz", "has_sig": false, "md5_digest": "778fa0f56cc6d78467e16034f081b26f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2814, "upload_time": "2019-03-06T06:24:24", "url": "https://files.pythonhosted.org/packages/93/6b/9661110bc571508fd5f05feb7034e485773de2f201491f36a5327f0b96d6/sort_dataframeby_monthorweek-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "8218165e68913813f902b02c7a06f848", "sha256": "8f8f8a8313d45cab82c16483f9ef2236d394eaa43de39b068dd18ef80b7cdbb6" }, "downloads": -1, "filename": "sort_dataframeby_monthorweek-0.4.tar.gz", "has_sig": false, "md5_digest": "8218165e68913813f902b02c7a06f848", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2817, "upload_time": "2019-03-06T13:02:21", "url": "https://files.pythonhosted.org/packages/7a/10/f5005db1735c3917c39bb29b2196aecee60d78a63663a107b8ac91c14c69/sort_dataframeby_monthorweek-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8218165e68913813f902b02c7a06f848", "sha256": "8f8f8a8313d45cab82c16483f9ef2236d394eaa43de39b068dd18ef80b7cdbb6" }, "downloads": -1, "filename": "sort_dataframeby_monthorweek-0.4.tar.gz", "has_sig": false, "md5_digest": "8218165e68913813f902b02c7a06f848", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2817, "upload_time": "2019-03-06T13:02:21", "url": "https://files.pythonhosted.org/packages/7a/10/f5005db1735c3917c39bb29b2196aecee60d78a63663a107b8ac91c14c69/sort_dataframeby_monthorweek-0.4.tar.gz" } ] }