{ "info": { "author": "thumbo", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [], "description": "###############################################\r\nComma-Separated-Values Row Operations (CSVROPE)\r\n###############################################\r\n\r\nThis module provides a set of simple utilities for retrieving, manipulating and\r\nupdating data organized in rows and contained in a CSV file.\r\n\r\nThe source code for this module lives at:\r\n\r\n https://github.com/thumbo/CSVrope\r\n\r\nPlease report any bugs or feature requests via the issue tracker there.\r\n\r\n\r\nINSTALLATION DEPENDENCIES\r\n=========================\r\n\r\nThe algorithms should work with Python 3.5 or later and require a few open\r\nsource Python modules. Below are the dependencies required for the toolset with\r\nthe versions with which the algorithm was tested:\r\n\r\n- Python 3.5\r\n- Nose 1.3.7\r\n\r\n\r\nINSTALLATION\r\n============\r\n\r\nThis module is registered with the Python package index.\r\n\r\nThe easiest way to install the package is to use pip.\r\nFirst make sure that your version of pip is up to date:\r\n\r\n https://pip.pypa.io/en/stable/installing/#upgrading-pip\r\n\r\n... and then run the command:\r\n\r\n ``pip install csvrope``\r\n\r\nFor additional information about how to use pip, please refer to the guide:\r\n\r\n https://packaging.python.org/installing/#use-pip-for-installing\r\n\r\nIn alternative you can also download the package from:\r\n\r\n http://pypi.python.org/pypi/csvrope\r\n\r\n... and compile it in the usual way:\r\n\r\n ``$ python setup.py install``\r\n\r\n\r\nUSAGE\r\n=====\r\n\r\nThe ``csvrope`` module contains a set of basic functions to be used in retrieving,\r\nupdating and manipulating data contained in a CSV file.\r\n\r\nThe ``csvrope`` module gives its best when the data contained in the CSV file\r\nis organized in a \"table\" form, as in the following example:\r\n\r\n a01, Mark, 22,male, yes, 126\r\n\r\n a02, Jane, 31,female, yes, 152\r\n\r\n a03, Philip, 28,male, no, 88\r\n\r\n a04, John, 19,male, yes, 115\r\n\r\n ...\r\n\r\n+-------------+-----------+-----------+-----------+-----------+-----------+-----------+\r\n| | Value 0 | Value 1 | Value 2 | Value 3 | Value 4 | Value 5 |\r\n+-------------+-----------+-----------+-----------+-----------+-----------+-----------+\r\n| Row 0 | a01 | Mark | 22 | male | yes | 126 |\r\n+-------------+-----------+-----------+-----------+-----------+-----------+-----------+\r\n| Row 1 | a02 | Jane | 31 | female | yes | 152 |\r\n+-------------+-----------+-----------+-----------+-----------+-----------+-----------+\r\n| Row 2 | a03 | Philip | 28 | male | no | 88 |\r\n+-------------+-----------+-----------+-----------+-----------+-----------+-----------+\r\n| Row 3 | a04 | John | 19 | male | yes | 115 |\r\n+-------------+-----------+-----------+-----------+-----------+-----------+-----------+\r\n| Row 4 | ... | ... | ... | ... | ... | ... |\r\n+-------------+-----------+-----------+-----------+-----------+-----------+-----------+\r\n\r\nIn order to use the following functions, it is sufficient to import the module\r\nwithin your script.\r\n\r\nFUNCTIONS:\r\n----------\r\n\r\n append_row(filename, row)\r\n Append a row at the end of CSV file.\r\n\r\n clear(filename)\r\n Clear the CSV file.\r\n\r\n count_rows(filename)\r\n Return the number of rows present in the CSV file, 0 if none.\r\n\r\n get_row(filename, row_index)\r\n Return the row at row_index, from zero-index.\r\n\r\n get_row_value(filename, row_index, value_index)\r\n Return the value at value_index from the row at row_index, from zero-index.\r\n\r\n get_row_values(filename, row_index, values_indexes)\r\n Return the values at value_indexes from the row at row_index, from zero-index.\r\n\r\n get_rows(filename)\r\n Return a list containing all the rows of the CSV file.\r\n\r\n get_rows_value(filename, value_index)\r\n Return all the values at value_index from each row, from zero-index.\r\n\r\n get_rows_with_value(filename, value_index, value_target)\r\n Return a list containing all the rows that have value_target at value_index, from zero-index.\r\n\r\n get_rows_with_values(filename, targets)\r\n Return a list of lists, each containing the rows that match the targets, from zero-index.\r\n\r\n Targets: [ [value1_index, value1_target], [value2_index, value2_target], ... ]\r\n\r\n Output: [ [rows with value1 ], [rows with value2], ... ]\r\n\r\n overwrite_row(filename, row_index, new_row)\r\n Overwrite the row at row_index with the new_row, from zero-index.\r\n\r\n print_rows(filename)\r\n Print all the rows contained in the CSV file.\r\n\r\n write_row(filename, row)\r\n Clear the CSV file and write a single row.\r\n\r\n\r\nFor an account of the functionalities available from this module,\r\nsee the tests.py module in the source code repository.\r\n\r\n\r\nNOTES\r\n=====\r\n\r\nThe ``csvrope`` module is intended to be used in combination with\r\nthe standard Python ``csv`` module.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/thumbo/CSVrope", "keywords": "csv edit utility row operation", "license": "Creative Commons Attribution 4.0 International license", "maintainer": "", "maintainer_email": "", "name": "CSVrope", "package_url": "https://pypi.org/project/CSVrope/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/CSVrope/", "project_urls": { "Homepage": "https://github.com/thumbo/CSVrope" }, "release_url": "https://pypi.org/project/CSVrope/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "A set of row-operations for CSV files.", "version": "1.0.0" }, "last_serial": 2351957, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "3e2f69b1bac923296ef043e9877d1ec3", "sha256": "a0643d9c43dcbefe0e7d3c5decd45a19a2af25eb6cdbb21890908e961174a949" }, "downloads": -1, "filename": "CSVrope-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3e2f69b1bac923296ef043e9877d1ec3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6160, "upload_time": "2016-09-19T23:42:30", "url": "https://files.pythonhosted.org/packages/c7/a7/ba667ed96cf3569706c60031fbff37a6b746b08eb9dfe62a1268d4a0c175/CSVrope-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "130764af4982ae8b8ee79997411316c8", "sha256": "a1a45e6783fd58a5d4b4c0956dd900408224607ee077da0238c54dccce72f067" }, "downloads": -1, "filename": "CSVrope-1.0.0.tar.gz", "has_sig": false, "md5_digest": "130764af4982ae8b8ee79997411316c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3686, "upload_time": "2016-09-19T23:42:32", "url": "https://files.pythonhosted.org/packages/44/4f/d02ce42c6787ce87e3db53036caeafac5e7ae8904c6483d01827a6ce77e7/CSVrope-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3e2f69b1bac923296ef043e9877d1ec3", "sha256": "a0643d9c43dcbefe0e7d3c5decd45a19a2af25eb6cdbb21890908e961174a949" }, "downloads": -1, "filename": "CSVrope-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3e2f69b1bac923296ef043e9877d1ec3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6160, "upload_time": "2016-09-19T23:42:30", "url": "https://files.pythonhosted.org/packages/c7/a7/ba667ed96cf3569706c60031fbff37a6b746b08eb9dfe62a1268d4a0c175/CSVrope-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "130764af4982ae8b8ee79997411316c8", "sha256": "a1a45e6783fd58a5d4b4c0956dd900408224607ee077da0238c54dccce72f067" }, "downloads": -1, "filename": "CSVrope-1.0.0.tar.gz", "has_sig": false, "md5_digest": "130764af4982ae8b8ee79997411316c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3686, "upload_time": "2016-09-19T23:42:32", "url": "https://files.pythonhosted.org/packages/44/4f/d02ce42c6787ce87e3db53036caeafac5e7ae8904c6483d01827a6ce77e7/CSVrope-1.0.0.tar.gz" } ] }