[pandas-vet] Deprecate pandas-df-variable-name (PD901)#18618
Merged
ntBre merged 1 commit intobrent/release-0.12.0from Jun 12, 2025
Merged
[pandas-vet] Deprecate pandas-df-variable-name (PD901)#18618ntBre merged 1 commit intobrent/release-0.12.0from
pandas-vet] Deprecate pandas-df-variable-name (PD901)#18618ntBre merged 1 commit intobrent/release-0.12.0from
Conversation
aaf6c9b to
96913d1
Compare
Contributor
|
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| PD901 | 430 | 0 | 430 | 0 | 0 |
Linter (preview)
ℹ️ ecosystem check detected linter changes. (+0 -430 violations, +0 -0 fixes in 3 projects; 52 projects unchanged)
apache/airflow (+0 -72 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --no-fix --output-format concise --preview --select ALL
- airflow-core/src/airflow/example_dags/tutorial_objectstorage.py:93:9: PD901 Avoid using the generic variable name `df` for DataFrames - airflow-core/src/airflow/serialization/serializers/pandas.py:68:9: PD901 Avoid using the generic variable name `df` for DataFrames - dev/airflow_perf/sql_queries.py:186:5: PD901 Avoid using the generic variable name `df` for DataFrames - dev/stats/explore_pr_candidates.ipynb:cell 3:23:5: PD901 Avoid using the generic variable name `df` for DataFrames - providers/amazon/tests/unit/amazon/aws/transfers/test_sql_to_s3.py:232:9: PD901 Avoid using the generic variable name `df` for DataFrames - providers/amazon/tests/unit/amazon/aws/transfers/test_sql_to_s3.py:283:9: PD901 Avoid using the generic variable name `df` for DataFrames - providers/amazon/tests/unit/amazon/aws/transfers/test_sql_to_s3.py:326:9: PD901 Avoid using the generic variable name `df` for DataFrames - providers/apache/drill/tests/unit/apache/drill/hooks/test_drill.py:116:9: PD901 Avoid using the generic variable name `df` for DataFrames - providers/apache/drill/tests/unit/apache/drill/hooks/test_drill.py:99:9: PD901 Avoid using the generic variable name `df` for DataFrames - providers/apache/druid/tests/unit/apache/druid/hooks/test_druid.py:461:9: PD901 Avoid using the generic variable name `df` for DataFrames ... 62 additional changes omitted for project
apache/superset (+0 -267 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --no-fix --output-format concise --preview --select ALL
- superset/charts/client_processing.py:110:9: PD901 Avoid using the generic variable name `df` for DataFrames - superset/charts/client_processing.py:112:13: PD901 Avoid using the generic variable name `df` for DataFrames - superset/charts/client_processing.py:113:9: PD901 Avoid using the generic variable name `df` for DataFrames - superset/charts/client_processing.py:114:9: PD901 Avoid using the generic variable name `df` for DataFrames - superset/charts/client_processing.py:124:9: PD901 Avoid using the generic variable name `df` for DataFrames - superset/charts/client_processing.py:132:9: PD901 Avoid using the generic variable name `df` for DataFrames - superset/charts/client_processing.py:136:9: PD901 Avoid using the generic variable name `df` for DataFrames - superset/charts/client_processing.py:141:9: PD901 Avoid using the generic variable name `df` for DataFrames - superset/charts/client_processing.py:144:9: PD901 Avoid using the generic variable name `df` for DataFrames - superset/charts/client_processing.py:147:9: PD901 Avoid using the generic variable name `df` for DataFrames - superset/charts/client_processing.py:206:17: PD901 Avoid using the generic variable name `df` for DataFrames - superset/charts/client_processing.py:213:9: PD901 Avoid using the generic variable name `df` for DataFrames - superset/charts/client_processing.py:341:13: PD901 Avoid using the generic variable name `df` for DataFrames - superset/charts/client_processing.py:343:13: PD901 Avoid using the generic variable name `df` for DataFrames - superset/charts/client_processing.py:91:5: PD901 Avoid using the generic variable name `df` for DataFrames - superset/charts/client_processing.py:95:9: PD901 Avoid using the generic variable name `df` for DataFrames - superset/commands/database/uploaders/csv_reader.py:135:9: PD901 Avoid using the generic variable name `df` for DataFrames - superset/commands/database/uploaders/excel_reader.py:108:13: PD901 Avoid using the generic variable name `df` for DataFrames - superset/commands/dataset/importers/v1/utils.py:207:5: PD901 Avoid using the generic variable name `df` for DataFrames - superset/commands/report/alert.py:179:17: PD901 Avoid using the generic variable name `df` for DataFrames - superset/commands/report/alert.py:204:9: PD901 Avoid using the generic variable name `df` for DataFrames - superset/commands/sql_lab/export.py:104:13: PD901 Avoid using the generic variable name `df` for DataFrames - superset/commands/sql_lab/export.py:128:13: PD901 Avoid using the generic variable name `df` for DataFrames - superset/common/query_actions.py:104:5: PD901 Avoid using the generic variable name `df` for DataFrames - superset/common/query_context_processor.py:268:9: PD901 Avoid using the generic variable name `df` for DataFrames - superset/common/query_context_processor.py:275:13: PD901 Avoid using the generic variable name `df` for DataFrames - superset/common/query_context_processor.py:279:17: PD901 Avoid using the generic variable name `df` for DataFrames - superset/common/query_context_processor.py:287:17: PD901 Avoid using the generic variable name `df` for DataFrames - superset/common/query_context_processor.py:602:13: PD901 Avoid using the generic variable name `df` for DataFrames - superset/common/query_context_processor.py:658:17: PD901 Avoid using the generic variable name `df` for DataFrames - superset/common/query_context_processor.py:665:17: PD901 Avoid using the generic variable name `df` for DataFrames ... 236 additional changes omitted for project
bokeh/bokeh (+0 -91 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --no-fix --output-format concise --preview --select ALL
- examples/basic/annotations/band.py:21:1: PD901 Avoid using the generic variable name `df` for DataFrames - examples/basic/annotations/band.py:25:1: PD901 Avoid using the generic variable name `df` for DataFrames - examples/basic/annotations/polygon_annotation.py:12:1: PD901 Avoid using the generic variable name `df` for DataFrames - examples/basic/areas/stacked_area.py:16:1: PD901 Avoid using the generic variable name `df` for DataFrames - examples/basic/axes/datetime_axis.py:6:1: PD901 Avoid using the generic variable name `df` for DataFrames - examples/basic/bars/intervals.py:14:1: PD901 Avoid using the generic variable name `df` for DataFrames - examples/interaction/legends/legend_hide.py:22:5: PD901 Avoid using the generic variable name `df` for DataFrames - examples/interaction/legends/legend_mute.py:11:5: PD901 Avoid using the generic variable name `df` for DataFrames - examples/models/daylight.py:24:1: PD901 Avoid using the generic variable name `df` for DataFrames - examples/models/trail.py:36:5: PD901 Avoid using the generic variable name `df` for DataFrames ... 81 additional changes omitted for project
Changes by rule (1 rules affected)
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| PD901 | 430 | 0 | 430 | 0 | 0 |
298a7ac to
452db43
Compare
3ad0f1f to
ff6fb14
Compare
MichaReiser
approved these changes
Jun 12, 2025
Member
MichaReiser
left a comment
There was a problem hiding this comment.
I share your sentiment. I wouldn't add this rule to Ruff today but I also think it isn't harmful.
Either way, I think this is heading in the right direction and we could consider adding a new lint rule instead that allows users to configure a set of names that they want to disallow.
Summary -- Deprecates PD901 as part of #7710. I don't feel particularly strongly about this one, though I have certainly used `df` as a dataframe name in the past, just going through the open issues in the 0.12 milestone. Test Plan -- N/a
452db43 to
739f4ba
Compare
dylwil3
approved these changes
Jun 12, 2025
ntBre
added a commit
that referenced
this pull request
Jun 12, 2025
Summary -- Deprecates PD901 as part of #7710. I don't feel particularly strongly about this one, though I have certainly used `df` as a dataframe name in the past, just going through the open issues in the 0.12 milestone. Test Plan -- N/a
ntBre
added a commit
that referenced
this pull request
Jun 16, 2025
Summary -- Deprecates PD901 as part of #7710. I don't feel particularly strongly about this one, though I have certainly used `df` as a dataframe name in the past, just going through the open issues in the 0.12 milestone. Test Plan -- N/a
ntBre
added a commit
that referenced
this pull request
Jun 17, 2025
Summary -- Deprecates PD901 as part of #7710. I don't feel particularly strongly about this one, though I have certainly used `df` as a dataframe name in the past, just going through the open issues in the 0.12 milestone. Test Plan -- N/a
ntBre
added a commit
that referenced
this pull request
Jun 17, 2025
Summary -- Deprecates PD901 as part of #7710. I don't feel particularly strongly about this one, though I have certainly used `df` as a dataframe name in the past, just going through the open issues in the 0.12 milestone. Test Plan -- N/a
carljm
added a commit
to MatthewMckee4/ruff
that referenced
this pull request
Jun 17, 2025
…ence * main: (71 commits) Bump 0.12.0 (astral-sh#18724) Revert "[ty] Offer "Did you mean...?" suggestions for unresolved `from` imports and unresolved attributes (astral-sh#18705)" (astral-sh#18721) [`flake8-return`] Stabilize only add `return None` at the end when fixing `implicit-return` (`RET503`) (astral-sh#18516) [`pyupgrade`] Stabilize `non-pep695-generic-function` (`UP047`) (astral-sh#18524) [`pyupgrade`] Stabilize `non-pep695-generic-class` (`UP046`) (astral-sh#18519) [`pandas-vet`] Deprecate `pandas-df-variable-name` (`PD901`) (astral-sh#18618) [`flake8-bandit`] Remove `suspicious-xmle-tree-usage` (`S320`) (astral-sh#18617) Stabilize `dataclass-enum` (`RUF049`) (astral-sh#18570) Stabilize `unnecessary-dict-index-lookup` (`PLR1733`) (astral-sh#18571) Remove rust-toolchain.toml from sdist (astral-sh#17925) Stabilize `starmap-zip` (`RUF058`) (astral-sh#18525) [`flake8-logging`] Stabilize `exc-info-outside-except-handler` (`LOG014`) (astral-sh#18517) [`pyupgrade`] Stabilize `non-pep604-annotation-optional` (`UP045`) and preview behavior for `non-pep604-annotation-union` (`UP007`) (astral-sh#18505) Stabilize `pytest-warns-too-broad` (`PT030`) (astral-sh#18568) Stabilize `for-loop-writes` (`FURB122`) (astral-sh#18565) Stabilize `pytest-warns-with-multiple-statements` (`PT031`) (astral-sh#18569) Stabilize `pytest-parameter-with-default-argument` (`PT028`) (astral-sh#18566) Stabilize `nan-comparison` (`PLW0177`) (astral-sh#18559) Stabilize `check-and-remove-from-set` (`FURB132`) (astral-sh#18560) Stabilize `unnecessary-round` (`RUF057`) (astral-sh#18563) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Deprecates PD901 as part of #7710. I don't feel particularly strongly about this one, though I have certainly used
dfas a dataframe name in the past, just going through the open issues in the 0.12 milestone.Test Plan
N/a