{"id":13735251,"url":"https://github.com/deppen8/pandas-vet","last_synced_at":"2025-09-10T00:09:50.525Z","repository":{"id":34239025,"uuid":"172439221","full_name":"deppen8/pandas-vet","owner":"deppen8","description":"A plugin for Flake8 that checks pandas code","archived":false,"fork":false,"pushed_at":"2023-08-11T17:41:30.000Z","size":173,"stargazers_count":170,"open_issues_count":13,"forks_count":18,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-13T19:48:42.648Z","etag":null,"topics":["flake8","flake8-plugin","linter","pandas","python"],"latest_commit_sha":null,"homepage":"https://pandas-vet.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deppen8.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-25T05:19:51.000Z","updated_at":"2025-02-13T08:52:43.000Z","dependencies_parsed_at":"2024-06-18T16:50:36.303Z","dependency_job_id":"63023216-986f-4a53-852f-74eb491cdffb","html_url":"https://github.com/deppen8/pandas-vet","commit_stats":{"total_commits":163,"total_committers":15,"mean_commits":"10.866666666666667","dds":0.6196319018404908,"last_synced_commit":"ded2485a6ead29f503c8ea63f6aa8e41487f0ad5"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deppen8%2Fpandas-vet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deppen8%2Fpandas-vet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deppen8%2Fpandas-vet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deppen8%2Fpandas-vet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deppen8","download_url":"https://codeload.github.com/deppen8/pandas-vet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253059242,"owners_count":21847243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flake8","flake8-plugin","linter","pandas","python"],"created_at":"2024-08-03T03:01:04.738Z","updated_at":"2025-05-08T11:32:40.580Z","avatar_url":"https://github.com/deppen8.png","language":"Python","funding_links":[],"categories":["(4) Packages","Linters \u0026 Style Checkers","Library-specific checks","📦 Additional Python Libraries"],"sub_categories":["(3.4) :blue_book: Books / papers","Code Quality \u0026 Development"],"readme":"# pandas-vet\n\n`pandas-vet` is a plugin for `flake8` that provides opinionated linting for `pandas` code.\n\n[![Documentation Status](https://readthedocs.org/projects/pandas-vet/badge/?version=stable)](https://pandas-vet.readthedocs.io/en/latest/?badge=stable)\n\n[![Test and lint](https://github.com/deppen8/pandas-vet/actions/workflows/testing.yml/badge.svg)](https://github.com/deppen8/pandas-vet/actions/workflows/testing.yml)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![PyPI - License](https://img.shields.io/pypi/l/pandas-vet.svg)](https://github.com/deppen8/pandas-vet/blob/main/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## Basic usage\n\nTake the following script, `drop_column.py`, which contains valid pandas code:\n\n```python\n# drop_column.py\nimport pandas\n\ndf = pandas.DataFrame({\n    'col_a': [i for i in range(20)],\n    'col_b': [j for j in range(20, 40)]\n})\ndf.drop(columns='col_b', inplace=True)\n```\n\nWith `pandas-vet` installed, if we run Flake8 on this script, we will see three warnings raised.\n\n```bash\n$ flake8 drop_column.py\n\n./drop_column.py:2:1: PD001 pandas should always be imported as 'import pandas as pd'\n./drop_column.py:4:1: PD901 'df' is a bad variable name. Be kinder to your future self.\n./drop_column.py:7:1: PD002 'inplace = True' should be avoided; it has inconsistent behavior\n```\n\nWe can use these to improve the code.\n\n```python\n# pandastic_drop_column.py\nimport pandas as pd\n\nab_dataset = pd.DataFrame({\n    'col_a': [i for i in range(20)],\n    'col_b': [j for j in range(20, 40)]\n})\na_dataset = ab_dataset.drop(columns='col_b')\n```\n\nFor a full list, see the [Supported warnings](https://pandas-vet.readthedocs.io/en/stable/guides/warnings.html) page of the documentation.\n\n## Motivation\n\nStarting with [pandas](https://pandas.pydata.org/) 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ścińska](https://twitter.com/lambdanis)'s talk at PyCascades 2019, [\"Lint your code responsibly!\"](https://youtu.be/hAnCiTpxXPg?t=21814). The package was largely developed at the PyCascades 2019 sprints.\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeppen8%2Fpandas-vet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeppen8%2Fpandas-vet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeppen8%2Fpandas-vet/lists"}