{ "info": { "author": "Martin Marenz", "author_email": "martin.marenz@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# DataFrameLabeler\nA small ipywidget tool for labeling data frames inside jupyter.\n\n# Installation\n\nCurrently, the only way to use the DataFrameLabeler is to clone this repositroy.\n\n# Why?\n\nThis small tool was inspired by the fast.ai image cleaner widget https://docs.fast.ai/widgets.image_cleaner.html .\nHowever, I needed a tool for tabular data.\n\n# How to use?\n\n```\n# imports\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom DataFrameLabeler import DataFrameLabeler\n\n# If you have a pandas data frame where you want to assign each row eihter 'SUCCESS' or 'FAILURE'.\n# like the following one.\nlength = 100\ncols = ['A', 'B', 'C', 'D', 'E']\ndf = pd.DataFrame(np.random.rand(length, len(cols)), columns=cols)\n\n# First you need a function responsible to print a single row.\ndef plotter(idx, row):\n fig = plt.figure()\n plt.plot([i for i in row[cols]])\n # plot should not be shown when called.\n plt.close(fig)\n return fig\n\n# Afterwards, just construct a DataFrameLabeler object.\n# If `target_col` exists in the data frame, its content will be used as preselection.\nlbl = DataFrameLabeler(df,\n labels=['FAILURE', 'SUCCESS'], # choices for the labels\n plotter=plotter, # function which plots each row\n target_col='class_name', # column name where the labels will be stored\n width=3, # number of figures in each row\n height=2 # number of rows shown at once\n )\n```\n![DataFrameLabeler](images/screenshot_lbl.png)\n```\n# To obtain the newly labeled data frame call lbl.get_labeled_data()\n```\n![Result](images/screenshot_res.png)\n\n## TODO:\n* rework how user defined plotter works, atm its horrifying, especially when\n using matplotlib\n* proper styling of buttons\n* allow groupby argument\n* allow multi selection\n* add automatic saving of intermediate result to csv or pickle file\n* rethink interface\n* add more unit tests\n* Documentation\n\n\n", "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/Blonck/DataFrameLabeler", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "DataFrameLabeler", "package_url": "https://pypi.org/project/DataFrameLabeler/", "platform": "", "project_url": "https://pypi.org/project/DataFrameLabeler/", "project_urls": { "Homepage": "https://github.com/Blonck/DataFrameLabeler" }, "release_url": "https://pypi.org/project/DataFrameLabeler/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "An ipywidget helper class to manually label rows in pandas data frames.", "version": "0.0.1" }, "last_serial": 5662713, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "8ef41a37ff6aea20b9c44529848b1e26", "sha256": "964b114d1e91ebd5993654458e6d6899e25ecd1d2258cafc254b46211e8ef265" }, "downloads": -1, "filename": "DataFrameLabeler-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "8ef41a37ff6aea20b9c44529848b1e26", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9542, "upload_time": "2019-08-11T16:54:49", "url": "https://files.pythonhosted.org/packages/89/dd/b222ff06b90326980e50e8ab4b0a7c6fd9ad4a37971cf8cac86958ba2dd6/DataFrameLabeler-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cfa79f54fb56751ce5fe6e0fafb245db", "sha256": "347a29e57ec660ca5a4b21b4cb7c05a151bdc8f9ab61c120d9a72d6d061e2ba4" }, "downloads": -1, "filename": "DataFrameLabeler-0.0.1.tar.gz", "has_sig": false, "md5_digest": "cfa79f54fb56751ce5fe6e0fafb245db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6642, "upload_time": "2019-08-11T16:54:51", "url": "https://files.pythonhosted.org/packages/fe/d4/9798a7d2233f8b39b468fda77a586715af2ecf9495e07444b4367fb4d544/DataFrameLabeler-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8ef41a37ff6aea20b9c44529848b1e26", "sha256": "964b114d1e91ebd5993654458e6d6899e25ecd1d2258cafc254b46211e8ef265" }, "downloads": -1, "filename": "DataFrameLabeler-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "8ef41a37ff6aea20b9c44529848b1e26", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9542, "upload_time": "2019-08-11T16:54:49", "url": "https://files.pythonhosted.org/packages/89/dd/b222ff06b90326980e50e8ab4b0a7c6fd9ad4a37971cf8cac86958ba2dd6/DataFrameLabeler-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cfa79f54fb56751ce5fe6e0fafb245db", "sha256": "347a29e57ec660ca5a4b21b4cb7c05a151bdc8f9ab61c120d9a72d6d061e2ba4" }, "downloads": -1, "filename": "DataFrameLabeler-0.0.1.tar.gz", "has_sig": false, "md5_digest": "cfa79f54fb56751ce5fe6e0fafb245db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6642, "upload_time": "2019-08-11T16:54:51", "url": "https://files.pythonhosted.org/packages/fe/d4/9798a7d2233f8b39b468fda77a586715af2ecf9495e07444b4367fb4d544/DataFrameLabeler-0.0.1.tar.gz" } ] }