{ "info": { "author": "Jacob Deppen", "author_email": "deppen.8@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Framework :: Flake8", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Quality Assurance" ], "description": "# pandas-vet\n\n[![Build Status](https://travis-ci.org/deppen8/pandas-vet.svg?branch=master)](https://travis-ci.org/deppen8/pandas-vet)\n[![PyPI - License](https://img.shields.io/pypi/l/pandas-vet.svg)](https://github.com/deppen8/pandas-vet/blob/master/LICENSE)\n\n[![PyPI](https://img.shields.io/pypi/v/pandas-vet.svg)](https://pypi.org/project/pandas-vet/)\n[![PyPI - Status](https://img.shields.io/pypi/status/pandas-vet.svg)](https://pypi.org/project/pandas-vet/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/pandas-vet.svg)](https://pypi.org/project/pandas-vet/)\n\n[![Conda Version](https://img.shields.io/conda/vn/conda-forge/pandas-vet.svg)](https://anaconda.org/conda-forge/pandas-vet)\n[![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/pandas-vet.svg)](https://anaconda.org/conda-forge/pandas-vet)\n\n`pandas-vet` is a plugin for `flake8` that provides opinionated linting for `pandas` code.\n\nIt began as a project during the PyCascades 2019 sprints.\n\n## Motivation\n\nStarting with `pandas` can be daunting. The usual internet help sites are littered with different ways to do the same thing and some features that the `pandas` docs themselves discourage live on in the API. `pandas-vet` is (hopefully) a way to help make `pandas` a little more friendly for newcomers by taking some opinionated stances about `pandas` best practices. It is designed to help users reduce the `pandas` universe.\n\nThe idea to create a linter was sparked by [Ania Kapu\u015bci\u0144ska](https://twitter.com/lambdanis)'s talk at PyCascades 2019, [\"Lint your code responsibly!\"](https://youtu.be/hAnCiTpxXPg?t=21814).\n\nMany of the opinions stem from [Ted Petrou's](https://twitter.com/TedPetrou) excellent [Minimally Sufficient Pandas](https://medium.com/dunder-data/minimally-sufficient-pandas-a8e67f2a2428). Other ideas are drawn from `pandas` docs or elsewhere. The [Pandas in Black and White](https://deppen8.github.io/pandas-bw/) flashcards have a lot of the same opinions too.\n\n## Installation\n\n`pandas-vet` is a plugin for `flake8`. If you don't have `flake8` already, it will install automatically when you install `pandas-vet`.\n\nThe plugin is on PyPI and can be installed with:\n\n```bash\npip install pandas-vet\n```\n\nIt can also be installed with `conda`:\n\n```bash\nconda install -c conda-forge pandas-vet\n```\n\n`pandas-vet` is tested under Python 3.5 and 3.6 and should work with later versions as well.\n\n## Usage\n\nOnce installed successfully in an environment that also has `flake8` installed, `pandas-vet` should run whenever `flake8` is run.\n\n```bash\n$ flake8 ...\n```\n\nSee the [`flake8` docs](http://flake8.pycqa.org/en/latest/user/invocation.html) for more information.\n\nFor a full list of implemented warnings, see [the list below](#list-of-warnings).\n\n## Contributing\n\n`pandas-vet` is still in the very early stages. Contributions are welcome from the community on code, tests, docs, and just about anything else.\n\n### Code of Conduct\n\nBecause this project started during the PyCascades 2019 sprints, we adopt the PyCascades minimal expectation that we \"Be excellent to each another\". Beyond that, we follow the Python Software Foundation's [Community Code of Conduct](https://www.python.org/psf/codeofconduct/).\n\n### Steps to contributing\n\n1. Please submit an issue (or draft PR) first describing the types of changes you'd like to implement.\n\n2. Fork the repo and create a new branch for your enhancement/fix.\n\n3. Write code, docs, etc.\n\n4. We use `pytest` and `flake8` to validate our codebase. The TravisCI integration will complain on pull requests if there are any failing tests or lint violations. To check these locally, run the following commands:\n\n```bash\npytest tests\n```\n\n```bash\nflake8 pandas_vet setup.py tests --exclude tests/data\n```\n\n5. Push to your forked repo.\n\n6. Submit pull request to the parent repo from your branch. Be sure to write a clear message and reference the Issue # that relates to your pull request.\n\n7. Feel good about giving back to open source projects.\n\n### How to add a check to the linter\n\n1. Write tests. At a *minimum*, you should have test cases where the linter should catch \"bad\" `pandas` and test cases where the linter should allow \"good\" `pandas`.\n\n2. Write your check function in `/pandas-vet/__init__.py`.\n\n3. Run `flake8` and `pytest` on the linter itself (see [Steps to contributing](#steps-to-contributing))\n\n\n## Contributors\n\n### PyCascades 2019 sprints team\n\n- Sam Beck\n- [Jacob Deppen](https://twitter.com/jacob_deppen)\n- Walt Javins\n- Charles Simchick\n- [Aly Sivji](https://twitter.com/CaiusSivjus)\n- Tim Smith\n\n### Other awesome contributors\n\n- Earl Clark\n- Leandro Leites\n\n## List of warnings\n\n**PD001:** pandas should always be imported as 'import pandas as pd'\n\n**PD002:** 'inplace = True' should be avoided; it has inconsistent behavior\n\n**PD003:** '.isna' is preferred to '.isnull'; functionality is equivalent\n\n**PD004:** '.notna' is preferred to '.notnull'; functionality is equivalent\n\n**PD005:** Use arithmetic operator instead of method\n\n**PD006:** Use comparison operator instead of method\n\n**PD007:** '.ix' is deprecated; use more explicit '.loc' or '.iloc'\n\n**PD008:** Use '.loc' instead of '.at'. If speed is important, use numpy.\n\n**PD009:** Use '.iloc' instead of '.iat'. If speed is important, use numpy.\n\n**PD010** '.pivot_table' is preferred to '.pivot' or '.unstack'; provides same functionality\n\n**PD011** Use '.array' or '.to_array()' instead of '.values'; 'values' is ambiguous\n\n**PDO12** '.read_csv' is preferred to '.read_table'; provides same functionality\n\n**PD013** '.melt' is preferred to '.stack'; provides same functionality\n\n**PD015** Use '.merge' method instead of 'pd.merge' function. They have equivalent functionality.\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/deppen8/pandas-vet", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pandas-vet", "package_url": "https://pypi.org/project/pandas-vet/", "platform": "", "project_url": "https://pypi.org/project/pandas-vet/", "project_urls": { "Homepage": "https://github.com/deppen8/pandas-vet" }, "release_url": "https://pypi.org/project/pandas-vet/0.2.1/", "requires_dist": [ "flake8 (>3.0.0)", "attrs" ], "requires_python": "", "summary": "A flake8 plugin to lint pandas in an opinionated way", "version": "0.2.1" }, "last_serial": 5592093, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "5144a4bff8fef1549d7925f17a91a150", "sha256": "0cc8ee61fc3bf096d34fe15dbf0c30576147b15e828a060c99fe93fc083e35ed" }, "downloads": -1, "filename": "pandas_vet-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5144a4bff8fef1549d7925f17a91a150", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3334, "upload_time": "2019-02-25T23:53:50", "url": "https://files.pythonhosted.org/packages/57/d2/b4d3213ae277c93508b1ca31559514a8159b800b4a555be9d054d7f1c372/pandas_vet-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "16617754e1f0460a8819e5687a47cd51", "sha256": "72e0e5f5787f3daa0b786b9f5cb79f46c5f18f86007ae1b61c3cbce4cf07e79b" }, "downloads": -1, "filename": "pandas-vet-0.0.1.tar.gz", "has_sig": false, "md5_digest": "16617754e1f0460a8819e5687a47cd51", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2062, "upload_time": "2019-02-25T23:53:52", "url": "https://files.pythonhosted.org/packages/9e/50/b3df7eb482fbdeb090f3f559af420c691bcf3ee1a323c6df1a474ce7f106/pandas-vet-0.0.1.tar.gz" } ], "0.0.2.dev0": [ { "comment_text": "", "digests": { "md5": "e4f9ab613af517ca470b6135f48406b5", "sha256": "8577f2f2ff4a7c509563d6eb857aeb4bff5428cef37a29534776741f3f2dcdc4" }, "downloads": -1, "filename": "pandas_vet-0.0.2.dev0-py3-none-any.whl", "has_sig": false, "md5_digest": "e4f9ab613af517ca470b6135f48406b5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4768, "upload_time": "2019-02-26T00:41:13", "url": "https://files.pythonhosted.org/packages/e5/d2/1251c19c3559e254ef66bb7ce97364aee69d401af2e15a7f35d50ed24b85/pandas_vet-0.0.2.dev0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4c6b1c945f4b3aff318cf411688668c7", "sha256": "3930b1e6eb28a81e09bcb93f7a7a133ae625e0f99eb8b0226f05eb18f558db64" }, "downloads": -1, "filename": "pandas-vet-0.0.2.dev0.tar.gz", "has_sig": false, "md5_digest": "4c6b1c945f4b3aff318cf411688668c7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3499, "upload_time": "2019-02-26T00:41:15", "url": "https://files.pythonhosted.org/packages/5b/ab/83398852b0a8fb132c529a53dc76c9c47061e903862e437bd539bc5288f7/pandas-vet-0.0.2.dev0.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "c330da58456788ad56a09f140f5a0cf2", "sha256": "5f4b490289da08474928fc2af8501c18a6529f4e05c80a936bfe99443fc56004" }, "downloads": -1, "filename": "pandas_vet-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c330da58456788ad56a09f140f5a0cf2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5570, "upload_time": "2019-02-27T23:34:35", "url": "https://files.pythonhosted.org/packages/0b/bc/f816acc7dbf137e6385fe297eb072f2a05d33f94b5b181e214c35e5cd339/pandas_vet-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dc6d7ef3c554751e7c6143607b754c1c", "sha256": "51e8ac4c161efa768bcb2ef93926648ed34ae33a75d2a8a33ea674fc0e16f481" }, "downloads": -1, "filename": "pandas-vet-0.1.0.tar.gz", "has_sig": false, "md5_digest": "dc6d7ef3c554751e7c6143607b754c1c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4535, "upload_time": "2019-02-27T23:34:36", "url": "https://files.pythonhosted.org/packages/5d/2b/1e18358f733255c026b75bdb3f232051c79751cd9ecb25ea048e25440e72/pandas-vet-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "608c49c03adcd70b52dcaa78e10dec70", "sha256": "22265a611342524689718dad0ca02244ea361b2b53088cf397bb0faaa42f455b" }, "downloads": -1, "filename": "pandas_vet-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "608c49c03adcd70b52dcaa78e10dec70", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7238, "upload_time": "2019-03-21T17:28:09", "url": "https://files.pythonhosted.org/packages/7a/eb/16fd2a902ee04542488a656d8eba2da0871720e62c77398018cf60c23710/pandas_vet-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fd91333bd0215748371a0f27510f6e39", "sha256": "57ea4906c176d61ea9c186607be7a53f4f1561b53f19f5b76ce2a5050f0bad41" }, "downloads": -1, "filename": "pandas-vet-0.2.0.tar.gz", "has_sig": false, "md5_digest": "fd91333bd0215748371a0f27510f6e39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6069, "upload_time": "2019-03-21T17:28:11", "url": "https://files.pythonhosted.org/packages/8e/5a/5c25224d8e8be39ab48707bbe6dc39f63bdab88419c5893035050bd71126/pandas-vet-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "adc53bb0d65bb16454ba91538bf8fa9f", "sha256": "983b66acd81363be8a520b57f2aa6b45e29dfc91bab9269b8dd3db389ae7de2b" }, "downloads": -1, "filename": "pandas_vet-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "adc53bb0d65bb16454ba91538bf8fa9f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7603, "upload_time": "2019-07-27T06:54:02", "url": "https://files.pythonhosted.org/packages/21/53/d031fd623fde85f554c73d87c431ad4cf5d929d89c1cd728ab5e4d145a52/pandas_vet-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0e8cefff776ae842dc0c1d4786ca82fc", "sha256": "f4e32167a948bc8553c15dd5ae7d4de2651f8cc3d7a370de358e9c061197c033" }, "downloads": -1, "filename": "pandas-vet-0.2.1.tar.gz", "has_sig": false, "md5_digest": "0e8cefff776ae842dc0c1d4786ca82fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6428, "upload_time": "2019-07-27T06:54:04", "url": "https://files.pythonhosted.org/packages/8f/1f/303c087960b43c4abc05a9a4b44b7e3d1619ab9bd35711686a7fe515b9b9/pandas-vet-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "adc53bb0d65bb16454ba91538bf8fa9f", "sha256": "983b66acd81363be8a520b57f2aa6b45e29dfc91bab9269b8dd3db389ae7de2b" }, "downloads": -1, "filename": "pandas_vet-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "adc53bb0d65bb16454ba91538bf8fa9f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7603, "upload_time": "2019-07-27T06:54:02", "url": "https://files.pythonhosted.org/packages/21/53/d031fd623fde85f554c73d87c431ad4cf5d929d89c1cd728ab5e4d145a52/pandas_vet-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0e8cefff776ae842dc0c1d4786ca82fc", "sha256": "f4e32167a948bc8553c15dd5ae7d4de2651f8cc3d7a370de358e9c061197c033" }, "downloads": -1, "filename": "pandas-vet-0.2.1.tar.gz", "has_sig": false, "md5_digest": "0e8cefff776ae842dc0c1d4786ca82fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6428, "upload_time": "2019-07-27T06:54:04", "url": "https://files.pythonhosted.org/packages/8f/1f/303c087960b43c4abc05a9a4b44b7e3d1619ab9bd35711686a7fe515b9b9/pandas-vet-0.2.1.tar.gz" } ] }