{ "info": { "author": "Mike Taylor", "author_email": "mike@taylortree.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "datio\n======\n*datio* is data processing library useful in simulation work.\n\nThe main class, Series, was designed to access data by rows or columns.\n\nSeries is useful in simulation work where you need to process each \nrow of data while analyzing the last x items for a given column.\n\nFor example, in stock simulations, you'll iterate through all the\nprices for a stock but for each price period calculate the 20 period moving\naverage of the closing price. The class, Series, makes the work of\nreading by rows while processing columns easy.\n\n\nOverview\n--------\nThe major functions of datio:\n\n* **Series():**\n Access data across rows or columns. Append by rows or columns.\n Update Series in place.\n \n* **lol2dol():**\n convert a list of lists to dict of lists. Basically move from\n accessing data by rows to accessing data by columns.\n \n* **csv2lol():**\n load data from a csv file to a list of lists.\n \n* **format_values():**\n convert a list of values from one type to another such as float,\n int, string, or datatime.strptime.\n\n\nLicense\n-------\nMade available under the MIT License.\n\n\nUsage\n-----\nImport the library:\n >>> import datio\n\nDefine some data to work with:\n >>> prices_lol = []\n >>> prices_lol.append(['1997-01-01', 'goog', '32.00'])\n >>> prices_lol.append(['1997-01-02', 'goog', '33.00'])\n >>> prices_lol.append(['1997-01-03', 'goog', '34.00'])\n\nLoad the data into your series:\n >>> series = datio.Series('dates', 'symbols', 'closes')\n >>> series.from_values(prices_lol)\n\nAccess all the dates in the series:\n >>> series.dates\n ['1997-01-01', '1997-01-02', '1997-01-03']\n \nAccess only the 2nd row of the series:\n >>> series[1]\n ('1997-01-02', 'goog', '33.00')\n\nAccess the 1st row of the series for the closes column:\n >>> series.closes[0]\n '32.00'\n\nFormat the closes column to float:\n >>> series.format('closes', float)\n [32.0, 33.0, 34.0]\n\nWe'd like to include price opens as well. So, append opens to series:\n >>> series.appendcol('opens', [31.00, 33.0, 35])\n >>> series.opens\n [31.0, 33.0, 35]\n\nWe'll probably need a column for storing moving averages later on:\n >>> series.initcol('sma_closes')\n >>> series.sma_closes\n [None, None, None]\n\nNow, we'd like to add a row for the 1997-01-04 price period:\n >>> series.append(['1997-01-04', 'goog', 38, 37])\n >>> series[3]\n ('1997-01-04', 'goog', 38, 37, None)\n \nAs you can see, the sma_closes column is None since we didn't include it in the appended values. So, let's change that to 0.0:\n >>> series.sma_closes[3] = 0.0\n\nLet's format the dates column to datetime:\n >>> series.format('dates', datetime.strptime, '%Y-%m-%d')\n >>> series.dates[0].__str__()\n '1997-01-01 00:00:00'\n\nFinally, let's sort the series from high to low closing price:\n >>> series.sort('closes', order='d')\n >>> series.closes\n [38, 34.0, 33.0, 32.0]\n\nRoadmap\n-------\n* Not sure if I want the columns to adhere to the last format call made for all future values appended?\n* Really don't like the fact that columns can be updated outside of the series. But, not sure if turning them into tuples is a good thing cause of overhead of needing to turn back to lists to update within series.\n* Considering having the rows from the call be namedtuples instead of tuples. This would allow named attribute access and I believe lower overhead? But, at this point, don't have a true need for this feature.\n\n\nContact\n-------\nFor additional information, please email:\n mike@taylortree.com", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/taylortree/datio", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "datio", "package_url": "https://pypi.org/project/datio/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/datio/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/taylortree/datio" }, "release_url": "https://pypi.org/project/datio/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "The datio library in Python.", "version": "0.0.1" }, "last_serial": 788833, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "862f36b9096a71f0332b583e31d6289c", "sha256": "38652b0b9e0dac91e064c4dd7eb7d82047115e7b0a784079326f30b100786b83" }, "downloads": -1, "filename": "datio-0.0.1-py2.6.egg", "has_sig": false, "md5_digest": "862f36b9096a71f0332b583e31d6289c", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 11561, "upload_time": "2012-02-12T22:58:10", "url": "https://files.pythonhosted.org/packages/09/ab/c720e791b2e352b69401efb4764fa9cdeeacddaaf4c2503d1eeec64ffd48/datio-0.0.1-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "e6fa68dbbf5838b2e384d185f4f69823", "sha256": "9d2e40a9e71cc5e7f97ff5bd9b616ddd0b8843383542af112c0d456267847edc" }, "downloads": -1, "filename": "datio-0.0.1.win32.exe", "has_sig": false, "md5_digest": "e6fa68dbbf5838b2e384d185f4f69823", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 206661, "upload_time": "2012-02-12T22:58:16", "url": "https://files.pythonhosted.org/packages/b1/4a/f2195602ff7d629f74e6b6a0dcd2f1e2f0495c507b98c012dfb183e23813/datio-0.0.1.win32.exe" }, { "comment_text": "", "digests": { "md5": "9b343f1cf6a1fb2fcc21d2ab6799ff23", "sha256": "6092a9a4be556d44ef9a36f77a56d1f6a66449f33134ceef837e60e1ebc227dd" }, "downloads": -1, "filename": "datio-0.0.1.zip", "has_sig": false, "md5_digest": "9b343f1cf6a1fb2fcc21d2ab6799ff23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13340, "upload_time": "2012-02-12T22:58:08", "url": "https://files.pythonhosted.org/packages/b9/22/d3baf1847537efaea0e04aae6a4a57a1863b1b82e5069d6e95e8405e37b0/datio-0.0.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "862f36b9096a71f0332b583e31d6289c", "sha256": "38652b0b9e0dac91e064c4dd7eb7d82047115e7b0a784079326f30b100786b83" }, "downloads": -1, "filename": "datio-0.0.1-py2.6.egg", "has_sig": false, "md5_digest": "862f36b9096a71f0332b583e31d6289c", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 11561, "upload_time": "2012-02-12T22:58:10", "url": "https://files.pythonhosted.org/packages/09/ab/c720e791b2e352b69401efb4764fa9cdeeacddaaf4c2503d1eeec64ffd48/datio-0.0.1-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "e6fa68dbbf5838b2e384d185f4f69823", "sha256": "9d2e40a9e71cc5e7f97ff5bd9b616ddd0b8843383542af112c0d456267847edc" }, "downloads": -1, "filename": "datio-0.0.1.win32.exe", "has_sig": false, "md5_digest": "e6fa68dbbf5838b2e384d185f4f69823", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 206661, "upload_time": "2012-02-12T22:58:16", "url": "https://files.pythonhosted.org/packages/b1/4a/f2195602ff7d629f74e6b6a0dcd2f1e2f0495c507b98c012dfb183e23813/datio-0.0.1.win32.exe" }, { "comment_text": "", "digests": { "md5": "9b343f1cf6a1fb2fcc21d2ab6799ff23", "sha256": "6092a9a4be556d44ef9a36f77a56d1f6a66449f33134ceef837e60e1ebc227dd" }, "downloads": -1, "filename": "datio-0.0.1.zip", "has_sig": false, "md5_digest": "9b343f1cf6a1fb2fcc21d2ab6799ff23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13340, "upload_time": "2012-02-12T22:58:08", "url": "https://files.pythonhosted.org/packages/b9/22/d3baf1847537efaea0e04aae6a4a57a1863b1b82e5069d6e95e8405e37b0/datio-0.0.1.zip" } ] }