{ "info": { "author": "Jim Kitchen", "author_email": "jim22k@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries" ], "description": "**Table**\n Think of this as a list of namedtuples, except the elements of the namedtuples\n can be edited. The table is initialized with a list of column header names.\n Appending to the table adds new rows. Rows are created using a list (positional)\n or dict (column names). Unspecified column cells default to ``None``.\n \n Other list methods (``insert``, ``pop``, ``remove``, ``extend``, ``reverse``) work as expected.\n ``sort`` allows a string key to indicate a sort-by-column. Search methods\n (``index``, ``count``, ``__contains__``) accept either a Row object or a list or dict.\n \n Additional methods useful for tables:\n \n * ``take(indexes_or_func)`` returns a new table based on passed in indexes\n Alternatively, applies a function to every row in the table and builds\n a new table out of rows that evaluate to True\n * ``column(colname)`` returns an iterator over values in a column\n \n**LookupTable**\n A lookup function or column is added to a basic Table. The lookup function is similar\n to a hash function, taking a Row object and returning a value. If a column is provided,\n the value in that column is the *lookup* value. A dict keeps track of these \"lookup\"\n values, allowing fast lookups on all seach methods (``index``, ``count``, ``__contains__``).\n These search methods accept either a Row object (which is run through the lookup function)\n or the *lookup* value. The *lookup* values do not need to be unique.\n\nExample\n-------\n\n::\n\n from datetime import datetime, date, timedelta\n from roundtable import Table\n # Create empty table with column headers\n tbl = Table(['Timestamp', 'Event', 'Root Cause', 'Due Date'])\n # Add rows to the table\n tbl.append((datetime(2013,1,2,12,30), 'Error code 129',\n 'Short on board', date(2013,1,8)))\n tbl.append({'Event': 'Pairwise testing',\n 'Due Date': date(2013,1,7)}) # other columns default to None\n # Build a sorted list of tasks due in the next week\n task_list = tbl.take(lambda row: row['Due Date'] - date.today() < timedelta(days=7))\n task_list.sort(col='Due Date', reverse=True)\n\n \nTable access methods:\n\n============================== ===========\nCode Return Type\n============================== ===========\n``mytable[0]`` Row object\n``mytable[-1]`` Row object\n``mytable[0:10:2]`` new Table object\n``mytable[0][0]`` value in cell\n``mytable[0][-1]`` value in cell\n``mytable[0, 0]`` value in cell\n``mytable[0]['a column']`` value in cell\n``mytable[0, 'a column']`` value in cell\n``mytable[0].Col2`` value in cell*\n``mytable.column(1)`` iterator over values in column\n``mytable.column('a column')`` iterator over values in column\n============================== ===========\n\n\\* As a special case, if a column name is a valid Python variable name and\n**starts with a capital letter** then an attribute will be added to the Row\nobject allowing access. The requirement to start with a capital letter avoids\nconflicts with other attributes and functions of the Row object.\n\n\nTable objects can be transformed into other table-like objects if modules are available:\n\n- NumPy Array : ``mytable.as_array()``\n- Pandas DataFrame: ``mytable.as_dataframe()``\n\nNote\n----\n\nWorks for Python 2.6+, 3.1+\n\nNo dependencies except when using the ``as_array()`` or ``as_dataframe()`` methods.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jim22k/roundtable", "keywords": "table", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "roundtable", "package_url": "https://pypi.org/project/roundtable/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/roundtable/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/jim22k/roundtable" }, "release_url": "https://pypi.org/project/roundtable/0.4/", "requires_dist": null, "requires_python": null, "summary": "King Arthur's finest collection of table-like containers", "version": "0.4" }, "last_serial": 799047, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "ab735b73817b93168efadf7c917473bf", "sha256": "8a4662d009618d655cb08c886941ca4cf4ec41847517165f8a021ada5bc9ed13" }, "downloads": -1, "filename": "roundtable-0.2.tar.gz", "has_sig": false, "md5_digest": "ab735b73817b93168efadf7c917473bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6126, "upload_time": "2013-04-23T02:57:03", "url": "https://files.pythonhosted.org/packages/33/11/1f1e7bab34f15929f3e6179a2e7d9eab259a5e8726b050c5ef5a949a0fd6/roundtable-0.2.tar.gz" }, { "comment_text": "", "digests": { "md5": "64a26d5095c2a2ee1799b39981650c48", "sha256": "8749eac0e4980ee6f99f562f4f9999cd502fbb5bd7f66fc724111070b901bd35" }, "downloads": -1, "filename": "roundtable-0.2.win32.exe", "has_sig": false, "md5_digest": "64a26d5095c2a2ee1799b39981650c48", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 204394, "upload_time": "2013-04-23T02:59:51", "url": "https://files.pythonhosted.org/packages/0c/b7/5863f72f6dc05ae1b32cac2d658dbb490ac55af838078eeb90c3da159007/roundtable-0.2.win32.exe" }, { "comment_text": "", "digests": { "md5": "f6bd616fe4dacf86c68884e3156f215c", "sha256": "6625fdd84e3b91fc8d02afe5a651b0e402dc0ef34ebe2508fed79098e190c18a" }, "downloads": -1, "filename": "roundtable-0.2.zip", "has_sig": false, "md5_digest": "f6bd616fe4dacf86c68884e3156f215c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8091, "upload_time": "2013-04-23T02:55:53", "url": "https://files.pythonhosted.org/packages/35/97/6d44b44e1109c192ab32d7a76fa04224db54f40c56e381fa97b9664293cc/roundtable-0.2.zip" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "79a88acc08456d26e982dc211187d999", "sha256": "3105261d47ca30d4de61e2ac5b123ba388b951d0d466d3ea4f1b8fd6210c9575" }, "downloads": -1, "filename": "roundtable-0.3.tar.gz", "has_sig": false, "md5_digest": "79a88acc08456d26e982dc211187d999", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8261, "upload_time": "2013-04-27T20:09:38", "url": "https://files.pythonhosted.org/packages/51/fb/c8ad7a7744c76aba04cb284c2d8b17a0096971c2f819bd176b6be34daf7d/roundtable-0.3.tar.gz" }, { "comment_text": "", "digests": { "md5": "725a5f9825cea5f42bfd0aeb275da35d", "sha256": "5bdd841ed03b41863e596fd6991623303c8eebd535b8bbef444c9273e12ba5bb" }, "downloads": -1, "filename": "roundtable-0.3.win32.exe", "has_sig": false, "md5_digest": "725a5f9825cea5f42bfd0aeb275da35d", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 210413, "upload_time": "2013-04-27T20:09:50", "url": "https://files.pythonhosted.org/packages/82/9a/38665c4df7fc9f40d93b1136dd40ac86ab6a4987d0be6bf7b5de96ff8a5a/roundtable-0.3.win32.exe" }, { "comment_text": "", "digests": { "md5": "eb6ac0ef454cfd4d06d0e8daceea1ecc", "sha256": "b14fc18a8e59d75d8e5140cff288a0b566a0f5efca41d9533f365faec715caee" }, "downloads": -1, "filename": "roundtable-0.3.zip", "has_sig": false, "md5_digest": "eb6ac0ef454cfd4d06d0e8daceea1ecc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10480, "upload_time": "2013-04-27T20:09:40", "url": "https://files.pythonhosted.org/packages/d7/6c/59f3b0a387301db51e747c12649faae72d57516f1b1d5b0a216d75343990/roundtable-0.3.zip" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "7793d499065eef1d9b7d1c107420b50d", "sha256": "ff0647466768b76f7936d4a5db6821db1721a53e08a5984190e546f185e93f9b" }, "downloads": -1, "filename": "roundtable-0.4.tar.gz", "has_sig": false, "md5_digest": "7793d499065eef1d9b7d1c107420b50d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8858, "upload_time": "2013-05-03T02:54:59", "url": "https://files.pythonhosted.org/packages/3b/7d/bfff1dbf3af631bdade6fc90ce528274d171e88add1cca0cc4268db909f4/roundtable-0.4.tar.gz" }, { "comment_text": "", "digests": { "md5": "1ffcfe09475d17f48cb3d9c8c0fb6acc", "sha256": "f7bf42ef420848f4228150ddf259f9d0ea866b986b146e746807b68d6e774b2e" }, "downloads": -1, "filename": "roundtable-0.4.win32.exe", "has_sig": false, "md5_digest": "1ffcfe09475d17f48cb3d9c8c0fb6acc", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 211230, "upload_time": "2013-05-03T02:55:10", "url": "https://files.pythonhosted.org/packages/44/a1/98bc45cc31c30414d042b5aecc9df7bf5d3a1e30fe465ccd08635b68dc6e/roundtable-0.4.win32.exe" }, { "comment_text": "", "digests": { "md5": "a4f881802749c7596b082fd27a63d751", "sha256": "d034c8c8a2b76e107065e4494515cb986ac4a4a8d700d81e4bd0c157ceb5318e" }, "downloads": -1, "filename": "roundtable-0.4.zip", "has_sig": false, "md5_digest": "a4f881802749c7596b082fd27a63d751", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11590, "upload_time": "2013-05-03T02:55:02", "url": "https://files.pythonhosted.org/packages/65/a5/197c5d65476f6a3865b28edecb3ee15963db8608387c1eafdaee273b7761/roundtable-0.4.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7793d499065eef1d9b7d1c107420b50d", "sha256": "ff0647466768b76f7936d4a5db6821db1721a53e08a5984190e546f185e93f9b" }, "downloads": -1, "filename": "roundtable-0.4.tar.gz", "has_sig": false, "md5_digest": "7793d499065eef1d9b7d1c107420b50d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8858, "upload_time": "2013-05-03T02:54:59", "url": "https://files.pythonhosted.org/packages/3b/7d/bfff1dbf3af631bdade6fc90ce528274d171e88add1cca0cc4268db909f4/roundtable-0.4.tar.gz" }, { "comment_text": "", "digests": { "md5": "1ffcfe09475d17f48cb3d9c8c0fb6acc", "sha256": "f7bf42ef420848f4228150ddf259f9d0ea866b986b146e746807b68d6e774b2e" }, "downloads": -1, "filename": "roundtable-0.4.win32.exe", "has_sig": false, "md5_digest": "1ffcfe09475d17f48cb3d9c8c0fb6acc", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 211230, "upload_time": "2013-05-03T02:55:10", "url": "https://files.pythonhosted.org/packages/44/a1/98bc45cc31c30414d042b5aecc9df7bf5d3a1e30fe465ccd08635b68dc6e/roundtable-0.4.win32.exe" }, { "comment_text": "", "digests": { "md5": "a4f881802749c7596b082fd27a63d751", "sha256": "d034c8c8a2b76e107065e4494515cb986ac4a4a8d700d81e4bd0c157ceb5318e" }, "downloads": -1, "filename": "roundtable-0.4.zip", "has_sig": false, "md5_digest": "a4f881802749c7596b082fd27a63d751", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11590, "upload_time": "2013-05-03T02:55:02", "url": "https://files.pythonhosted.org/packages/65/a5/197c5d65476f6a3865b28edecb3ee15963db8608387c1eafdaee273b7761/roundtable-0.4.zip" } ] }